unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: gerd.moellmann@t-online.de (Gerd Moellmann)
Cc: emacs-devel@gnu.org
Subject: Re: Declarations in macro definitions
Date: 21 Mar 2002 12:12:52 +0100	[thread overview]
Message-ID: <86r8medvij.fsf@gerd.dnsq.org> (raw)
In-Reply-To: <200203210904.g2L94Sb10148@wijiji.santafe.edu>

Richard Stallman <rms@gnu.org> writes:

>     > I like the the idea of putting this info in a macro definition, but I
>     > don't think `declare' is a good name for it.  That name is too general
>     > to fit this rather specific meaning.
> 
>     (But it's familiar to Lisp programmers for a long time...)
> 
> My memory of `declare' is different (and probably comes from Maclisp
> in the 70s).  Could you tell me how you have seen it used?

This is an excerpt from some actual CL code:

  (defmacro mlet (vars value &body body)
    #+lispm(declare (compiler:do-not-record-macroexpansions)
                    (zwei:indentation 1 3 2 1))
    `(multiple-value-bind ,vars ,value ,@body))

I haven't seen anything for the debugger yet.

[What I meant by ``familiar'' is not that (contemporary Common:-) Lisp
programmers are specifically used to using `declare' for specifying
indentation (I'm not aware that/if they are), but that CL programmers
are used to `declare' in general, and to implementation-defined
declaration specifiers in particular.]

>     > (ISTR that someone was implementing this for edebug a few months
>     > ago--in fact, I thought it had been installed already.
> 
>     In that case I guess my patch won't be needed.
> 
> That code has not been installed--I checked that after I saw your
> message.  I think we never got papers for it.
> 
> 
> That code is more elegant in some ways, because the edebug form spec
> is stored in the macro definition itself and never goes in any other
> data base.  However, your code is much simpler.  Given that anonymous
> macros are not useful, perhaps your simple approach is better.

I haven't seen the other code, so I cannot compare the two.  The
simplicity of the declare approach you mentioned yourself, which made
it easy to handle both Edebug specs and indentation without touching
Edebug or the Lisp indentation code.

I like that simplicity, but on the other hand, I don't have strong
feelings about this.  Just tell me if you want it installed at some
point.

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


      reply	other threads:[~2002-03-21 11:12 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
2002-03-20 13:44     ` Juanma Barranquero
2002-03-21  9:04     ` Richard Stallman
2002-03-21 11:12       ` Gerd Moellmann [this message]

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