From: Juanma Barranquero <lektu@terra.es>
Cc: "Emacs-Devel \(E-mail\)" <emacs-devel@gnu.org>
Subject: Re: New function `emacs-version>='
Date: Fri, 02 May 2003 23:35:14 +0200 [thread overview]
Message-ID: <20030502232146.C2FF.LEKTU@terra.es> (raw)
In-Reply-To: <200305022114.h42LE8PH022578@rum.cs.yale.edu>
On Fri, 02 May 2003 17:14:07 -0400, "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> wrote:
> I think Christoph knows that.
Sure, I didn't intend to imply otherwise. Rhetoric took hold of me :(
> It's just that sometimes it's difficult
> to test whether A works or not. For instance, how do you check whether
> the `display' property is supported by your version of Emacs ?
Yeah, sure. But most features are not isolated, there are related
variables, functions and sometimes even an entry in `features'... And if
not, I'd call that a bug in the feature/fix implementation (I'm
exaggerating, but only a bit.)
And, as a last resort, you can often do something like
(unless (ignore-errors XXXX)
YYYY)
(I do that to check whether windmove-default-keybindings supports the
MODIFIER argument or not.)
> How do you test whether PNG images are supported (without actually
> displaying such an image) ? ...
(memq 'png image-types) ; :-)
> In most cases, there's a better solution than testing emacs-version, but
> there are still some where testing emacs-version makes sense and furthermore
> people do it anyway, so I'd rather provide an `emacs-version>=' rather than
> see something fail in Emacs-21 because some idiot wrote
> (or (= 20 emacs-major-version) (>= 29 emacs-minor-version)).
I'm not going to oppose that, but I'd bet is going to bring more grief
than help. I can speak only about my very subjective experience, and
certainly my .emacs (1,600+ lines) is more robust now than before, when
I used several flavors of emacs and window-system checking.
> And then we can make bytecomp.el emit warning messages about
> how you shouldn't use that function ;-)
Eh, I *like* that ;-)
/L/e/k/t/u
next prev parent reply other threads:[~2003-05-02 21:35 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-02 19:55 [Suggestion] New function `emacs-version>=' Wedler, Christoph
2003-05-02 21:00 ` Juanma Barranquero
2003-05-02 21:14 ` Stefan Monnier
2003-05-02 21:35 ` Juanma Barranquero [this message]
2003-05-03 11:12 ` Ehud Karni
2003-05-03 13:54 ` Juanma Barranquero
2003-05-03 16:08 ` Stephen J. Turnbull
2003-05-04 19:15 ` Juanma Barranquero
2003-05-06 11:05 ` Stephen J. Turnbull
2003-05-04 13:04 ` Richard Stallman
2003-05-03 17:48 ` Reiner Steib
2003-05-03 18:42 ` Stefan Monnier
2003-05-05 13:47 ` sort-coding-systems in 21.3 and RC branch (was: New function `emacs-version>=') Reiner Steib
2003-05-06 7:08 ` Kenichi Handa
2003-05-02 21:16 ` [Suggestion] New function `emacs-version>=' Thien-Thi Nguyen
2003-05-04 13:03 ` Richard Stallman
2003-05-05 12:52 ` Wedler, Christoph
2003-05-05 13:20 ` Juanma Barranquero
2003-05-05 19:11 ` Richard Stallman
2003-05-05 21:59 ` Luc Teirlinck
2003-05-06 23:42 ` Istvan Marko
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=20030502232146.C2FF.LEKTU@terra.es \
--to=lektu@terra.es \
--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 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).