Emacs works with several window systems, most notably the X Window System. Both Emacs and X use the term “window”, but use it differently. An Emacs frame is a single window as far as X is concerned; the individual Emacs windows are not known to X at all.
This terminal-local variable tells Lisp programs what window system Emacs is using for displaying the frame. The possible values are
- Emacs is displaying the frame using X.
- Emacs is displaying the frame using native MS-Windows GUI.
- Emacs is displaying the frame using the Nextstep interface (used on GNUstep and Mac OS X).
- Emacs is displaying the frame using MS-DOS direct screen writes.
- Emacs is displaying the frame on a character-based terminal.
This variable holds the value of
window-systemused for the first frame created by Emacs during startup. (When Emacs is invoked with the --daemon option, it does not create any initial frames, so
nil. See daemon.)
This function returns a symbol whose name tells what window system is used for displaying frame (which defaults to the currently selected frame). The list of possible symbols it returns is the same one documented for the variable
Do not use
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
predicates described in Display Feature Testing.
This variable is a normal hook which Emacs runs after handling the initialization files. Emacs runs this hook after it has completed loading your init file, the default initialization file (if any), and the terminal-specific Lisp code, and running the hook
This hook is used for internal purposes: setting up communication with the window system, and creating the initial window. Users should not interfere with it.