unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: gerd.moellmann@t-online.de (Gerd Moellmann)
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Declarations in macro definitions
Date: 20 Mar 2002 13:11:29 +0100	[thread overview]
Message-ID: <86k7s7qw0e.fsf@gerd.dnsq.org> (raw)
In-Reply-To: <200203192218.g2JMIsY08758@rum.cs.yale.edu>

> > In that case I guess my patch won't be needed.
> 
> I don't think that there is anything already installed that does what
> you patch does.  Maybe someone has been working on this, but at least
> I haven't heard anything conclusive.

In case the patch might be useful anyway---I see that I forgot to send
the diff for bytecomp.el (the thing would be pretty useless if it
didn't work with compiled code :-).  Here it is:

*** bytecomp.el	2002/03/13 23:05:30	2.94
--- bytecomp.el	2002/03/20 12:06:35
***************
*** 1980,1985 ****
--- 1980,2001 ----
  	       (stringp (car-safe (cdr-safe (cdr-safe body)))))
  	  (byte-compile-warn "probable `\"' without `\\' in doc string of %s"
  			     (nth 1 form))))
+ 
+     ;; Generate code for declarations in macro definitions.
+     ;; Remove declarations from the body of the macro definition.
+     (when macrop
+       (let ((tail (nthcdr 2 form)))
+ 	(when (stringp (car (cdr tail)))
+ 	  (setq tail (cdr tail)))
+ 	(while (and (consp (car (cdr tail)))
+ 		    (eq (car (car (cdr tail))) 'declare))
+ 	  (let ((declaration (car (cdr tail))))
+ 	    (setcdr tail (cdr (cdr tail)))
+ 	    (princ `(if macro-declaration-function
+ 			(funcall macro-declaration-function
+ 				 ',name ',declaration))
+ 		   outbuffer)))))
+       
      (let* ((new-one (byte-compile-lambda (cons 'lambda (nthcdr 2 form))))
  	   (code (byte-compile-byte-code-maker new-one)))
        (if this-one

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


  reply	other threads:[~2002-03-20 12:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-17 12:34 Declarations in macro definitions Gerd Moellmann
2002-03-18  9:05 ` Richard Stallman
2002-03-19 21:53   ` Gerd Moellmann
2002-03-19 22:18     ` Stefan Monnier
2002-03-20 12:11       ` Gerd Moellmann [this message]
2002-03-20 13:44     ` Juanma Barranquero
2002-03-21  9:04     ` Richard Stallman
2002-03-21 11:12       ` Gerd Moellmann

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=86k7s7qw0e.fsf@gerd.dnsq.org \
    --to=gerd.moellmann@t-online.de \
    --cc=emacs-devel@gnu.org \
    --cc=gerd@gnu.org \
    --cc=rms@gnu.org \
    /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).