From: storm@cua.dk (Kim F. Storm)
Cc: Miles Bader <miles@lsi.nec.co.jp>,
Martin Stjernholm <mast@lysator.liu.se>,
Dave Love <d.love@dl.ac.uk>, Kenichi Handa <handa@m17n.org>,
rms@gnu.org, emacs-devel@gnu.org
Subject: Re: cc-vars.el
Date: 20 Nov 2002 17:37:40 +0100 [thread overview]
Message-ID: <5x7kf8yz6z.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <200211201501.gAKF1Jo21597@rum.cs.yale.edu>
"Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes:
> > > But I also completely agree that we should try to make sure that pragmas
> > > as needed as rarely as possible, so I wholeheartedly support Dave's
> > > suggestion which will at least reduce the amount of useless warnings.
> >
> > One of the problems I've seen is with code which is conditioned to
> > differentiate between either gnu emacs and xemacs, or between different
> > os-types.
>
> This is irrelevant: Dave's patch doesn't impact those cases at all.
Off-topic, but not irrelevant IMO.
>
> > In the first case, many packages seem to have their own "xyz-xemacs-p"
> > function or variable, and the bytecompiler will surely have a hard time
> > determining whether a piece of code isn't used at all on this platform.
>
> And it shouldn't: the code should simply be fixed. In 90% of the
> time an fboundp check would be better (and Dave's patch would then have
> a chance of understanding what's going on).
True, but an fboundp check doesn't work in the cases where emacs and xemacs
functions have different parameter lists, such as display-completion-list.
>
> > A new built-in variable `emacs-type' (value = 'gnu-emacs or e.g. 'xemacs)
> > would fix this problem; for portability, packages may add the following
> > snippet to support older versions of gnu and xemacs:
>
> We don't want to encourage people to use brain dead tests like those.
> There's already (featurep 'xemacs) for such things.
That's good to know, thanks!!!
A quick scan shows that the following packages don't use the proper test:
bookmark.el, ediff.el, filesets.el, follow.el, ido.el,
iswitchb.el, ps-print.el, speedbar.el [partially], term.el,
type-break.el, edt, viper, eshell, net/eudc-bob.el, ada-mode.el,
cperl-mode.el, hideshow.el, octave-mod.el, flyspell.el, ispell.el
Even loaddefs.el has (defconst xemacsp ...) which comes from ispell.el
So the tests may be brain dead, but very popular...
> Maybe we should add to byte-opt.el the following snippet:
>
> (put 'featurep 'byte-optimizer 'byte-optimize-featurep)
> (defun byte-optimize-featurep (form)
> (if (equal '(featurep 'xemacs) form) nil form))
>
> since Emacs-21's byte-code won't work on XEmacs anyway, there's no
> point keeping XEmacs code around. It makes the code shorter and
> gets rid of a few warnings.
That's the right approach, yes. Please install it!
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2002-11-20 16:37 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E18CrrF-0005AT-00@fencepost.gnu.org>
[not found] ` <rzqwunberel.fsf@albion.dl.ac.uk>
2002-11-18 0:57 ` cc-vars.el Kenichi Handa
2002-11-18 19:09 ` cc-vars.el Richard Stallman
2002-11-18 19:51 ` cc-vars.el Dave Love
2002-11-18 22:15 ` cc-vars.el Martin Stjernholm
2002-11-19 1:40 ` cc-vars.el Miles Bader
2002-11-19 15:45 ` cc-vars.el Martin Stjernholm
2002-11-19 16:57 ` cc-vars.el Miles Bader
2002-11-19 21:58 ` cc-vars.el Martin Stjernholm
2002-11-20 2:22 ` cc-vars.el Miles Bader
2002-11-20 13:58 ` cc-vars.el Stefan Monnier
2002-11-20 15:43 ` cc-vars.el Kim F. Storm
2002-11-20 15:01 ` cc-vars.el Stefan Monnier
2002-11-20 16:37 ` Kim F. Storm [this message]
2002-11-24 19:32 ` cc-vars.el Dave Love
2002-11-24 19:30 ` cc-vars.el Dave Love
2002-11-20 21:29 ` cc-vars.el Miles Bader
2002-11-20 21:44 ` cc-vars.el Stefan Monnier
2002-11-22 1:51 ` cc-vars.el Martin Stjernholm
2002-11-21 17:12 ` cc-vars.el Richard Stallman
2002-11-21 18:55 ` cc-vars.el Stefan Monnier
2002-11-22 2:00 ` cc-vars.el Martin Stjernholm
2002-11-20 16:40 ` cc-vars.el Dave Love
2002-11-20 16:35 ` cc-vars.el Dave Love
2002-11-19 16:59 ` cc-vars.el Dave Love
2002-11-20 21:14 ` cc-vars.el Richard Stallman
2002-11-24 19:33 ` cc-vars.el Dave Love
2002-11-20 21:41 ` cc-vars.el Miles Bader
2002-11-24 19:36 ` cc-vars.el Dave Love
2002-11-19 7:49 ` cc-vars.el Kai Großjohann
2002-11-19 16:55 ` cc-vars.el Dave Love
2002-11-19 20:35 ` cc-vars.el Martin Stjernholm
2002-11-20 9:46 ` cc-vars.el Kai Großjohann
2002-11-21 17:12 ` cc-vars.el Richard Stallman
2002-11-20 16:38 ` cc-vars.el Dave Love
2002-11-18 22:17 ` cc-vars.el Stefan Monnier
2002-11-19 17:01 ` cc-vars.el Dave Love
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=5x7kf8yz6z.fsf@kfs2.cua.dk \
--to=storm@cua.dk \
--cc=d.love@dl.ac.uk \
--cc=emacs-devel@gnu.org \
--cc=handa@m17n.org \
--cc=mast@lysator.liu.se \
--cc=miles@lsi.nec.co.jp \
--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).