emacs-devel
[Top][All Lists]
Advanced

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

Use of `window-system' as a predicate is deprecated. Why?


From: Alan Mackenzie
Subject: Use of `window-system' as a predicate is deprecated. Why?
Date: Sat, 9 Jul 2022 12:22:41 +0000

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).



reply via email to

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