mirror of
https://github.com/doomemacs/doomemacs.git
synced 2025-12-06 10:31:23 -08:00
feat: add wsl detection
Can now be detected with (featurep :system 'wsl).
This commit is contained in:
parent
8a2c7fe3d4
commit
5b103261f4
1 changed files with 7 additions and 0 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue