unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Use of `window-system' as a predicate is deprecated.  Why?
@ 2022-07-09 12:22 Alan Mackenzie
  2022-07-09 12:36 ` Po Lu
  2022-07-09 12:40 ` Eli Zaretskii
  0 siblings, 2 replies; 5+ messages in thread
From: Alan Mackenzie @ 2022-07-09 12:22 UTC (permalink / raw)
  To: emacs-devel

Hello, Emacs.

The doc string for window-system and its Elisp manual entry say that the
function should not be used.  The manual entry says:

   Do _not_ use `window-system' and `initial-window-system' as predicates
   or boolean flag variables, if you want to write code that works
   differently on text terminals and graphic displays.  That is because
   `window-system' is not a good indicator of Emacs capabilities on a
   given display type.  Instead, use `display-graphic-p' or any of the
   other `display-*-p' predicates described in Display Feature Testing.

..  I am amending minibuf.c and wish to know only whether the current
terminal->focus_frame_hook is validly set.

The manual entry seems to be to be unnecessarily patronising.  It
insinuates that the only possible "capabilities" a user could be
interested in are graphic capabilities.

Surely I should not have to go such ridiculous lengths as calling a lisp
function which has nothing to do with what I need, and then interpreting
its result.

So, how should I find out whether terminal->focus_frame_hook is valid or
not, if I'm not allowed to use Fwindow_system?

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-09 13:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-09 12:22 Use of `window-system' as a predicate is deprecated. Why? Alan Mackenzie
2022-07-09 12:36 ` Po Lu
2022-07-09 12:37   ` Po Lu
2022-07-09 12:40 ` Eli Zaretskii
2022-07-09 13:27   ` Alan Mackenzie

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).