all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Steve Youngs <steve@sxemacs.org>
To: emacs-devel@gnu.org
Subject: Re: [PATCH] New convenience macros
Date: Thu, 23 Aug 2007 21:13:11 +1000	[thread overview]
Message-ID: <microsoft-free.87veb633nc.fsf@youngs.au.com> (raw)
In-Reply-To: jwvejhyx379.fsf-monnier+emacs@gnu.org


[-- Attachment #1.1: Type: text/plain, Size: 1920 bytes --]

* Stefan Monnier <monnier@iro.umontreal.ca> writes:

  >> I added these to SXEmacs a little while ago.  They are a couple of
  >> macros that can be used when you need to conditionalise on emacs
  >> flavour.  And at the same time not generate byte-compiler warnings,
  >> regardless of the flavour of emacs you are using to compile the
  >> .el.

  > We've done it differently in Emacs-22 (and maybe even Emacs-21:
  > can't remember exactly when it was introduced): (featurep 'xemacs)
  > is known by the source-level optimizer as a constant of value nil,
  > so

  >   (if (featurep 'xemacs) a b)

  > will only look at `b' and won't generate any warnings about code in
  > `a'.  The corresponding code is very simple (in byte-opt.el):

  >    (put 'featurep 'byte-optimizer 'byte-optimize-featurep)
  >    (defun byte-optimize-featurep (form)
  >      ;; Emacs-21's byte-code doesn't run under XEmacs anyway, so we can
  >      ;; safely optimize away this test.
  >      (if (equal '((quote xemacs)) (cdr-safe form))
  >          nil
  >        form))

Oh, that's nice.  Thank you very much for showing me this, Stefan, I'm
going to add something similar to SXEmacs (and XEmacs too I hope).

  > I haven't come across any (featurep 'sxemacs) yet, so the code
  > hasn't been updated for that use yet, but it's trivial to do so,
  > obviously.

And because it would be so trivial, perhaps you wouldn't mind adding it
now, Stefan?  There's currently not much (if anything) out in the wild
that would depend on (featurep 'sxemacs), but we're constantly adding
new stuff so it's only a matter of time. :-)

Thanks very much!

-- 
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
|       SXEmacs - The only _______ you'll ever need.       |
|         Fill in the blank, yes, it's THAT good!          |
|------------------------------------<steve@sxemacs.org>---|

[-- Attachment #1.2: Type: application/pgp-signature, Size: 312 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

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

  reply	other threads:[~2007-08-23 11:13 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
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 [this message]
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=microsoft-free.87veb633nc.fsf@youngs.au.com \
    --to=steve@sxemacs.org \
    --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.