From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Andreas Schwab <schwab@suse.de>,
storm@cua.dk, emacs-devel@gnu.org, rgm@gnu.org
Subject: Re: cl-byte-compile-compiler-macro
Date: Wed, 05 Apr 2006 15:32:18 -0400 [thread overview]
Message-ID: <jwvvetnstv2.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <E1FRDKu-0007lb-6n@fencepost.gnu.org> (Richard Stallman's message of "Wed, 05 Apr 2006 15:06:36 -0400")
>> When I compile quux.el, does that need CL to be loaded?
>> (Assume quux.el does not load CL itself.)
> I think it does, since the accessor function has a byte-compile property
> that points to function in cl-macs (cl-byte-compile-compiler-macro).
> I think it should be possible to compile quux.el without loading CL.
> I proposed moving that function and its subroutine to subr.el.
> Will that achieve the goal?
An alternative solution might be the following which just ignores the
cl-byte-compile-compiler-macro value unless that function is indeed defined.
Since compiler-macros are supposed to only provide optimizations but no
change in semantics, no running them should always be harmless.
Please install it if you think it's right.
Stefan
Index: bytecomp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/bytecomp.el,v
retrieving revision 2.181
diff -u -u -b -r2.181 bytecomp.el
--- bytecomp.el 13 Jan 2006 09:54:33 -0000 2.181
+++ bytecomp.el 5 Apr 2006 19:30:00 -0000
@@ -429,8 +429,7 @@
;; (apply 'byte-compiler-options-handler forms)))
(eval-when-compile . (lambda (&rest body)
(list 'quote
- (byte-compile-eval (byte-compile-top-level
- (cons 'progn body))))))
+ (byte-compile-eval (cons 'progn body)))))
(eval-and-compile . (lambda (&rest body)
(byte-compile-eval-before-compile (cons 'progn body))
(cons 'progn body))))
@@ -2765,6 +2764,11 @@
(byte-compile-warn "`%s' used from Lisp code\n\
That command is designed for interactive use only" fn))
(if (and handler
+ ;; 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.
+ (fboundp handler)
(or (not (byte-compile-version-cond
byte-compile-compatibility))
(not (get (get fn 'byte-opcode) 'emacs19-opcode))))
next prev parent reply other threads:[~2006-04-05 19:32 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-22 21:02 cl-byte-compile-compiler-macro Kim F. Storm
2006-03-23 23:52 ` cl-byte-compile-compiler-macro Glenn Morris
2006-03-24 23:25 ` cl-byte-compile-compiler-macro Richard Stallman
2006-03-25 2:52 ` cl-byte-compile-compiler-macro Glenn Morris
2006-03-25 9:43 ` cl-byte-compile-compiler-macro Glenn Morris
2006-03-25 14:20 ` cl-byte-compile-compiler-macro Andreas Schwab
2006-03-28 6:39 ` cl-byte-compile-compiler-macro Glenn Morris
2006-03-25 15:26 ` cl-byte-compile-compiler-macro Richard Stallman
2006-03-25 20:55 ` cl-byte-compile-compiler-macro Kim F. Storm
2006-03-26 11:21 ` cl-byte-compile-compiler-macro Richard Stallman
2006-03-26 14:10 ` cl-byte-compile-compiler-macro Andreas Schwab
2006-03-27 2:07 ` cl-byte-compile-compiler-macro Stefan Monnier
2006-03-27 9:34 ` cl-byte-compile-compiler-macro Andreas Schwab
2006-03-27 22:29 ` cl-byte-compile-compiler-macro Richard Stallman
2006-03-27 23:44 ` cl-byte-compile-compiler-macro Andreas Schwab
2006-03-28 19:33 ` cl-byte-compile-compiler-macro Richard Stallman
2006-04-04 19:57 ` cl-byte-compile-compiler-macro Richard Stallman
2006-04-04 20:37 ` cl-byte-compile-compiler-macro Andreas Schwab
2006-04-05 3:47 ` cl-byte-compile-compiler-macro Richard Stallman
2006-04-05 9:27 ` cl-byte-compile-compiler-macro Andreas Schwab
2006-04-05 13:04 ` cl-byte-compile-compiler-macro Stefan Monnier
2006-04-05 19:06 ` cl-byte-compile-compiler-macro Richard Stallman
2006-04-05 19:32 ` Stefan Monnier [this message]
2006-04-05 19:39 ` cl-byte-compile-compiler-macro David Kastrup
2006-04-05 20:12 ` cl-byte-compile-compiler-macro Stefan Monnier
2006-04-06 3:58 ` cl-byte-compile-compiler-macro Richard Stallman
2006-04-08 15:09 ` cl-byte-compile-compiler-macro Stefan Monnier
2006-04-05 21:23 ` cl-byte-compile-compiler-macro Andreas Schwab
2006-04-04 20:50 ` cl-byte-compile-compiler-macro Stefan Monnier
2006-03-28 6:52 ` cl-byte-compile-compiler-macro Glenn Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvvetnstv2.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=rgm@gnu.org \
--cc=schwab@suse.de \
--cc=storm@cua.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).