mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
feat: add wsl detection
Can now be detected with (featurep :system 'wsl).
This commit is contained in:
@ -132,6 +132,13 @@
|
|||||||
(defconst doom--system-macos-p (eq 'macos (car doom-system)))
|
(defconst doom--system-macos-p (eq 'macos (car doom-system)))
|
||||||
(defconst doom--system-linux-p (eq 'linux (car doom-system)))
|
(defconst doom--system-linux-p (eq 'linux (car doom-system)))
|
||||||
|
|
||||||
|
;; Announce WSL if it is detected.
|
||||||
|
(when (and doom--system-linux-p
|
||||||
|
(if (boundp 'operating-system-release) ; is deprecated since 28.x
|
||||||
|
(string-match-p "-[Mm]icrosoft" operating-system-release)
|
||||||
|
(getenv-internal "WSLENV")))
|
||||||
|
(add-to-list 'doom-system 'wsl 'append))
|
||||||
|
|
||||||
;; `system-type' is esoteric, so I create a pseudo feature as a stable and
|
;; `system-type' is esoteric, so I create a pseudo feature as a stable and
|
||||||
;; consistent alternative, for use with `featurep'.
|
;; consistent alternative, for use with `featurep'.
|
||||||
(push :system features)
|
(push :system features)
|
||||||
|
Reference in New Issue
Block a user