Re: device-color-cells a pain
Bill Wohler <[email protected]> Sat, 25 Feb 2006 09:43:02 -0800
| Newsgroups | gmane.emacs.xemacs.general |
|---|---|
| Organization | Newt Software |
| Message-ID | <[email protected]> |
Stephen J. Turnbull <[email protected]> wrote: > >>>>> "Bill" == Bill Wohler <[email protected]> writes: > > Bill> Sorry if I wasn't clear. I wasn't stating the actual > Bill> heuristic, just my personal observation. > > I think it's reasonable to guess that GNU Emacs is using some kind of > heuristic if it returns those values in those circumstances. As far > as I know there is no standard way to find out how many colors a TTY > supports. > > Bill> Thanks. Unfortunately, these don't seem to be in 21.4.18. It > Bill> seems to me that putting this logic in device-color-cells in > Bill> the first place would avoid these problems. > > As far as I can see, that would cripple applications that have more > strict requirements. Either *you* have to test device-color-cells, or > the "sophisticated" application has to use a completely different API. > You can't both get the desired semantics from the same API. > > If you have a suggestion that serves both purposes, I'd love to hear > it. But IMO a second API is silly when (or (device-color-cells) 2) is > sufficient for your purposes. I just took a quick look at the code for display-color-cells and it returns the correct value no matter the display. I like that since it removes the burden from the user from having to know about and deal with all types of displays. -- Bill Wohler <[email protected]> http://www.newt.com/wohler/ GnuPG ID:610BD9AD Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian! If you're passed on the right, you're in the wrong lane.