all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
To: emacs-devel@gnu.org
Subject: Re: [PATCH] New convenience macros
Date: Mon, 20 Aug 2007 12:58:47 +0200	[thread overview]
Message-ID: <87absmjwuw.fsf@kfs-lx.testafd.dk> (raw)
In-Reply-To: <microsoft-free.87fy2f0xkk.fsf@youngs.au.com> (Steve Youngs's message of "Mon\, 20 Aug 2007 12\:06\:03 +1000")

Steve Youngs <steve@sxemacs.org> writes:

> NotDashEscaped: You need GnuPG to verify this message
>
> * Richard Stallman <rms@gnu.org> writes:
>
>   > I don't want to contrast the name "XEmacs" with the name "GNU Emacs",
>   > so I don't want these macros installed in Emacs under the names
>   > proposed.
>
> How about.. `do-in-emacs', `do-in-xemacs', `do-in-sxemacs', and
> `with-emacs-type', and change the symbol in `with-emacs-type' from `gnu'
> to `emacs'.  Would that be better?
>
> The names aren't that important, providing they are consistent across
> the 3 emacs variants.  I have no particular preference so I'm happy to
> go with whatever names you decide, Richard.  Just let me know what names
> you do use for these macros so I can ensure the same goes into XEmacs
> and SXEmacs.

So far, there is code in Emacs which is XEmacs aware by testing on
(if (featurep 'xemacs) ...) and the byte compiler being aware that
this condition is always false in Emacs, so XEmacs code is ignored.

We could arrange for to byte-compiler to know about (featurep
'sxemacs) as well, but I think that's as far as we should go in terms
of differentiating yet another Emacs derivate.

I suppose that SXEmacs also provides xemacs (or you will have to edit
a lot of existing code!), so it is really only for the differences
between SXEmacs and XEmacs that you may need additional sxemacs tests.

I really don't see why Emacs has to be concerned about that.
Next month somebody else will ask for support for TXEmacs.

I could go as far as creating a new macro "when-emacs" that could
be used as

  (when-emacs emacs ...)
  (when-emacs xemacs ...)
  (when-emacs sxemacs ...)

which simply expands into

  (if (featurep (quote VARIANT)) BODY)

And instead of just a fixed 'xemacs symbol in the byte compiler,
there could be a list of features to ignore:

(defvar byte-compiler-ignored-features '(xemacs sxemacs))


-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2007-08-20 10:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-18 14:30 [PATCH] New convenience macros Steve Youngs
2007-08-19 15:52 ` Richard Stallman
2007-08-20  2:06   ` Steve Youngs
2007-08-20 10:58     ` Kim F. Storm [this message]
2007-08-20 18:30     ` Richard Stallman
2007-08-23 10:54       ` Steve Youngs
2007-08-23 14:12         ` Johan Bockgård
2007-08-23 14:47         ` Stefan Monnier
2007-08-23 18:24           ` Steve Youngs
2007-08-23 19:12             ` Stefan Monnier
2007-08-26 14:52               ` Steve Youngs
2007-08-26 22:47                 ` Richard Stallman
2007-08-27  3:20                   ` Steve Youngs
2007-08-20  4:09 ` Stefan Monnier
2007-08-23 11:13   ` Steve Youngs
2007-08-23 15:11     ` Stefan Monnier
2007-08-23 18:24       ` Steve Youngs

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87absmjwuw.fsf@kfs-lx.testafd.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.