[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: terminal capability querying

From: Eli Zaretskii
Subject: Re: terminal capability querying
Date: Sat, 20 Apr 2002 10:08:38 +0300

> From: Miles Bader <address@hidden>
> Date: 20 Apr 2002 11:20:11 +0900
> So, I propose adding the ability to ask emacs _which_ of these
> capabilities a display supports, both in lisp code and in `defface'
> specifications.

I think it's a good idea.

>   (display-capable-p ATTRIBUTE &optional DISPLAY)
>     Return non-nil if DISPLAY supports the face attribute ATTRIBUTE.

Could we change the name to something like display-attributes-p, or
even display-text-attributes-p?  display-capable-p sounds too general
for the specific purpose you have in mind (if I understand you well).

Otherwise, I like the design.

>     ATTRIBUTE should be either the name of a face attribute, e.g.,
>     `:weight', `:underline', etc., or a cons-cell or list containing a
>     face attribute and a specific value for it, e.g., (:weight bold).

If we intend to use this mainly for a tty (I guess windowed displays
will always pass all these tests), it's perhaps better to use `:bold'
directly, since terminals generally don't support more than a single
value of `weight'.  The same goes for `:slant': I think it's better
to use `:italic'.

What about `dim' and `blink', btw?

> It's not at all hard to implement this, I think, so I will do so if no
> one objects.

I'm for it.

There's one other piece of work that IMHO needs to be done to make
defface better: the ability to test for the number of supported
colors.  This is needed for supporting terminals that can display
large number of colors in text mode, such as recent versions of xterm.
We could then all but get rid of testing the frame type (`x', `w32',
`tty', etc.) in defface, and instead look at the number of supported
colors.  This has been on my todo for a long time, and I will do it as
soon as I can, but if someone feels to make it happen earlier...

reply via email to

[Prev in Thread] Current Thread [Next in Thread]