Function: hyperb:window-sys-term

hyperb:window-sys-term is a byte-compiled function defined in hversion.el.

Signature

(hyperb:window-sys-term &optional FRAME)

Documentation

Return first part of the term-type if running under a window system, else nil.

Where a part in the term-type is delimited by a - or an _.
FRAME defaults to the selected frame.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hversion.el
(defun hyperb:window-sys-term (&optional frame)
  "Return first part of the term-type if running under a window system, else nil.
Where a part in the term-type is delimited by a `-' or  an `_'.
FRAME defaults to the selected frame."
  (unless frame (setq frame (selected-frame)))
  (let* ((display-type window-system)
	 (term (cond ((or (memq display-type '(x gtk mswindows win32 w32 ns dps pm))
			  ;; May be a graphical client spawned from a
			  ;; dumb terminal Emacs, e.g. under X, so if
			  ;; the selected frame has mouse support,
			  ;; then there is a window system to support.
			  (display-mouse-p))
		      ;; X11, macOS, NEXTSTEP (DPS), or OS/2 Presentation Manager (PM)
		      "emacs")
		     ;; Keep NeXT as basis for 2-button mouse support
		     ((or (featurep 'eterm-fns)
			  (equal (getenv "TERM") "NeXT")
			  (equal (getenv "TERM") "eterm"))
		      ;; NEXTSTEP add-on support to Emacs
		      "next"))))
    (set-frame-parameter frame 'hyperb:window-system term)
    term))