[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to use graphic-display-p and window-system
From: |
Stefan Monnier |
Subject: |
Re: how to use graphic-display-p and window-system |
Date: |
Fri, 17 Apr 2009 19:54:08 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) |
>> That's totally unrelated to window-system or the display being
>> graphic. For example, on MS-Windows, S-TAB is supported even under
>> "-nw", where window-system and display-graphic-p are both nil.
> So what is it related to then?
Nothing. Using C-x @ [Ssachm], you can create pretty much any
combination of key and modifiers in any frame.
So your notion of "fancy keys" is not a hard-and-fast one: it can only
be a heuristic. If window-system is one of w32, x, ns then you can
probably assume that most key combos are easily feasible (tho it
actually still depends on the keyboard in use, etc...), if it's nil (but
running under w32), then those combos are probably still possible.
Under DOS, window-system is not nil, but I don't know how ckey combos
can be entered. Under xterm, window-system is nil, and many/most key
combos can also be used nowadays (and you can configure xterm&emacs for
most/all of the missing ones).
The general solution is to not try to answer the question: instead, make
sure you provide a "guaranteed" binding (i.e. a binding that only uses
keys that are known to work pretty much everywhere), and once that's
done you may also provide another binding using a less standard key.
> 1. General colors vs no colors or limited set of colors (e.g. 256).
`display-color-cells'.
> 2. General keys vs no modifiers for keys such as TAB, insert, and
> prior. This means also distinguishing between, say, C-l and C-S-l.
Fundamentally impossible.
> On a related note, in Emacs releases prior to those that have
> `display-mouse-p', `display-graphic-p', etc. what are the proper tests
> to use for such things?
There aren't any.
> Is `window-system' as good as it gets for Emacs 20/21?
Pretty much, yes.
> There might of course be some out-of-date uses of `window-system' in
> the Emacs 23 source code.
Yes, there are many.
Stefan
- how to use graphic-display-p and window-system, Drew Adams, 2009/04/17
- Re: how to use graphic-display-p and window-system, Eli Zaretskii, 2009/04/17
- Re: how to use graphic-display-p and window-system, Miles Bader, 2009/04/17
- Re: how to use graphic-display-p and window-system, Stefan Monnier, 2009/04/17
- RE: how to use graphic-display-p and window-system, Drew Adams, 2009/04/18
- Re: how to use graphic-display-p and window-system, Miles Bader, 2009/04/18
- Re: how to use graphic-display-p and window-system, Eli Zaretskii, 2009/04/18
- Re: how to use graphic-display-p and window-system, Eli Zaretskii, 2009/04/18