refactor!: deprecate IS-* OS constants

BREAKING CHANGE: This deprecates the IS-(MAC|WINDOWS|LINUX|BSD) family
of global constants in favor of a native `featurep` check:

  IS-MAC      ->  (featurep :system 'macos)
  IS-WINDOWS  ->  (featurep :system 'windows)
  IS-LINUX    ->  (featurep :system 'linux)
  IS-BSD      ->  (featurep :system 'bsd)

The constants will stick around until the v3 release so folks can still
use it -- and there are still some modules that use it, but I'll phase
those uses out gradually.

Fix: #7479
This commit is contained in:
Henrik Lissner 2023-12-05 17:05:13 -05:00
parent d38787edf4
commit 659f7bfc71
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
52 changed files with 150 additions and 120 deletions

View file

@ -507,7 +507,7 @@ relative to `org-directory', unless it is an absolute path."
"file" :face (lambda (path)
(if (or (file-remote-p path)
;; filter out network shares on windows (slow)
(if IS-WINDOWS (string-prefix-p "\\\\" path))
(if (featurep :system 'windows) (string-prefix-p "\\\\" path))
(file-exists-p path))
'org-link
'(warning org-link))))
@ -931,7 +931,7 @@ between the two."
[C-return] #'+org/insert-item-below
[C-S-return] #'+org/insert-item-above
[C-M-return] #'org-insert-subheading
(:when IS-MAC
(:when (featurep :system 'macos)
[s-return] #'+org/insert-item-below
[s-S-return] #'+org/insert-item-above
[s-M-return] #'org-insert-subheading)
@ -1391,7 +1391,7 @@ between the two."
"Advise `server-visit-files' to load `org-protocol' lazily."
:around #'server-visit-files
(if (not (cl-loop with protocol =
(if IS-WINDOWS
(if (featurep :system 'windows)
;; On Windows, the file arguments for `emacsclient'
;; get funnelled through `expand-file-path' by
;; `server-process-filter'. This substitutes