[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New function `emacs-version>='
From: |
Juanma Barranquero |
Subject: |
Re: New function `emacs-version>=' |
Date: |
Fri, 02 May 2003 23:35:14 +0200 |
On Fri, 02 May 2003 17:14:07 -0400, "Stefan Monnier"
<monnier+gnu/address@hidden> 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
- [Suggestion] New function `emacs-version>=', Wedler, Christoph, 2003/05/02
- Re: New function `emacs-version>=', Juanma Barranquero, 2003/05/02
- Re: New function `emacs-version>=', Stefan Monnier, 2003/05/02
- Re: New function `emacs-version>=',
Juanma Barranquero <=
- Re: New function `emacs-version>=', Ehud Karni, 2003/05/03
- Re: New function `emacs-version>=', Juanma Barranquero, 2003/05/03
- Re: New function `emacs-version>=', Stephen J. Turnbull, 2003/05/03
- Re: New function `emacs-version>=', Juanma Barranquero, 2003/05/04
- Re: New function `emacs-version>=', Stephen J. Turnbull, 2003/05/06
- Re: New function `emacs-version>=', Richard Stallman, 2003/05/04
- Re: New function `emacs-version>=', Reiner Steib, 2003/05/03
- Re: New function `emacs-version>=', Stefan Monnier, 2003/05/03
- sort-coding-systems in 21.3 and RC branch (was: New function `emacs-version>='), Reiner Steib, 2003/05/05
- Re: sort-coding-systems in 21.3 and RC branch (was: New function `emacs-version>='), Kenichi Handa, 2003/05/06