From: "Drew Adams" <drew.adams@oracle.com>
To: "'Eli Zaretskii'" <eliz@gnu.org>, <help-gnu-emacs@gnu.org>
Subject: RE: Using the same custom file in two different OSes
Date: Thu, 17 Jan 2013 10:15:58 -0800 [thread overview]
Message-ID: <5A215296D64C4D40A27409D73647E458@us.oracle.com> (raw)
In-Reply-To: <83r4lj7la4.fsf@gnu.org>
> > And frame.el is the very file where `display-graphic-p' is
> > *defined*. It is called only 3 times in that file, while
> > `window-system' seems to be used there as a predicate 7 times.
>
> I see only 5 instances, not 7,
These occurrences all looked to me superficially like they were just testing
whether FRAME is for graphic display:
1. (when (memq (window-system frame) '(x w32 ns))
(x-focus-frame frame))
2. (or (window-system frame)
(and tty-type
(string-match "^\\(xterm\\|\\rxvt\\|dtterm\\|eterm\\)"
tty-type)))
3. (cond ((null (window-system frame))
(if (tty-display-color-p frame) 'color 'mono))
4. (and (window-system frame)
(x-get-resource "backgroundMode" "BackgroundMode"))
5 and 6 (two occurrences).
(or window-system
(face-set-after-frame-default (selected-frame)))
OK, these occurrences use the variable `window-system', not the function, but it
too is deprecated in favor of function `display-*-p'.
7. (not (memq window-system '(x w32 ns)))
Again, the deprecated variable. If you don't count the variable occurrences
then 4, not 5, AFAICT.
> and it is not clear to me what display-*-p predicate would be
> appropriate in their stead.
If it's not clear to you how to replace deprecated `window-system' occurrences
here, I wonder how it should be clear to us mortals. ;-)
But which of the functions with names matching `display-*-p' correspond to what
you and the `window-system' deprecation doc mean by `display-*-p'? All of them?
display-color-p
display-graphic-p
display-grayscale-p
display-images-p
display-mouse-p
display-multi-font-p
display-multi-frame-p
display-popup-menus-p
display-selections-p
display-supports-face-attributes-p
display-time-file-nonempty-p
If all of them, then there should be a comma in the `window-system' doc string
here, just before "which":
Instead, use `display-graphic-p' or any of the other `display-*-p'
predicates which report frame's specific UI-related capabilities.
^
Without a comma, the text suggests that there are some `display-*-p' predicates
that do not "report frame's...", and that those are not included as
`window-system' substitutes.
(BTW, "frame's" here should be "FRAME's", referring to the argument. Or else it
should say "the frame's".)
next prev parent reply other threads:[~2013-01-17 18:15 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-13 22:00 Using the same custom file in two different OSes Dani Moncayo
2013-01-13 22:18 ` Drew Adams
2013-01-14 18:46 ` Dani Moncayo
2013-01-14 19:13 ` Drew Adams
2013-01-14 19:42 ` Dani Moncayo
2013-01-14 21:55 ` Peter Dyballa
2013-01-14 23:00 ` Dani Moncayo
2013-01-15 8:25 ` Didier Verna
2013-01-15 8:42 ` Dani Moncayo
2013-01-14 22:05 ` Drew Adams
2013-01-16 21:03 ` Dani Moncayo
[not found] ` <mailman.17633.1358371586.855.help-gnu-emacs@gnu.org>
2013-01-17 8:43 ` Sebastien Vauban
2013-01-17 14:19 ` Drew Adams
2013-01-17 14:38 ` Peter Dyballa
2013-01-17 15:22 ` Dani Moncayo
2013-01-17 16:38 ` Eli Zaretskii
2013-01-17 16:01 ` Drew Adams
2013-01-17 16:33 ` Eli Zaretskii
2013-01-17 16:32 ` Eli Zaretskii
2013-01-17 16:57 ` Drew Adams
2013-01-17 17:48 ` Eli Zaretskii
2013-01-17 18:15 ` Drew Adams [this message]
2013-01-17 18:44 ` Eli Zaretskii
2013-01-15 13:27 ` Stefan Monnier
2013-01-15 20:27 ` Dani Moncayo
[not found] ` <mailman.17532.1358281671.855.help-gnu-emacs@gnu.org>
2013-01-16 8:58 ` Sebastien Vauban
2013-01-16 20:35 ` Dani Moncayo
2013-01-16 12:59 ` Jason Rumney
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5A215296D64C4D40A27409D73647E458@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=eliz@gnu.org \
--cc=help-gnu-emacs@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.