unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Andreas Schwab <schwab@suse.de>,
	storm@cua.dk, rms@gnu.org, rgm@gnu.org, emacs-devel@gnu.org
Subject: Re: cl-byte-compile-compiler-macro
Date: Wed, 05 Apr 2006 16:12:36 -0400	[thread overview]
Message-ID: <jwvpsjvssbl.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <85acaz24nu.fsf@lola.goethe.zz> (David Kastrup's message of "Wed, 05 Apr 2006 21:39:17 +0200")

> Uh, what?  Am I just confused about the terminology you use?

Yes.

> defmacro most certainly does not provide optional stuff to the compiler.

We're not talking about macros but about compiler-macros.

> defsubst would, but is the result of that called a "compiler macro" while
> the result of "defmacro" isn't?

Yes.  A compiler-macro, contrary to a macro, is only expanded by the
compiler but not by the interpreter, so you can't rely on it
being expanded.  Also it's not expanded if the function is
called indirectly.

> It appears that the current behavior makes it hard to track down the
> problem.  I think the solution should be to create better diagnostics
> for pinpointing the problem instead of removing them completely.

OK, here's the same but with a diagnostic.


        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 20:11:50 -0000
@@ -2765,6 +2764,14 @@
 		(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.
+                    (or (fboundp handler)
+                        (progn (byte-compile-warn
+                                "Ignoring byte-compiler handler `%S'" handler)
+                               nil))
 		    (or (not (byte-compile-version-cond
 			      byte-compile-compatibility))
 			(not (get (get fn 'byte-opcode) 'emacs19-opcode))))

  reply	other threads:[~2006-04-05 20:12 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                               ` cl-byte-compile-compiler-macro Stefan Monnier
2006-04-05 19:39                                 ` cl-byte-compile-compiler-macro David Kastrup
2006-04-05 20:12                                   ` Stefan Monnier [this message]
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=jwvpsjvssbl.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=rgm@gnu.org \
    --cc=rms@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).