Move OS constants to core/core.el
So it is universally available to all of Doom, rather than excluding sessions that haven't called doom-initialize interactively.
This commit is contained in:
parent
bc2f8a0ec9
commit
81c465a545
3 changed files with 47 additions and 48 deletions
|
@ -1,10 +1,5 @@
|
||||||
;;; core-os.el -*- lexical-binding: t; -*-
|
;;; core-os.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
(defconst IS-MAC (eq system-type 'darwin))
|
|
||||||
(defconst IS-LINUX (eq system-type 'gnu/linux))
|
|
||||||
(defconst IS-WINDOWS (memq system-type '(cygwin windows-nt ms-dos)))
|
|
||||||
|
|
||||||
(unless noninteractive
|
|
||||||
;; clipboard
|
;; clipboard
|
||||||
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)
|
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)
|
||||||
;; Use a shared clipboard
|
;; Use a shared clipboard
|
||||||
|
@ -51,7 +46,7 @@
|
||||||
|
|
||||||
(IS-WINDOWS
|
(IS-WINDOWS
|
||||||
(setq w32-get-true-file-attributes nil) ; fix file io slowdowns
|
(setq w32-get-true-file-attributes nil) ; fix file io slowdowns
|
||||||
)))
|
))
|
||||||
|
|
||||||
(provide 'core-os)
|
(provide 'core-os)
|
||||||
;;; core-os.el ends here
|
;;; core-os.el ends here
|
||||||
|
|
|
@ -286,10 +286,10 @@ to least)."
|
||||||
(unless (or force-p noninteractive)
|
(unless (or force-p noninteractive)
|
||||||
(doom//reload-package-autoloads))))
|
(doom//reload-package-autoloads))))
|
||||||
;; Initialize Doom core
|
;; Initialize Doom core
|
||||||
(require 'core-os)
|
|
||||||
(unless noninteractive
|
(unless noninteractive
|
||||||
(add-hook! 'emacs-startup-hook
|
(add-hook! 'emacs-startup-hook
|
||||||
#'(doom|post-init doom|display-benchmark))
|
#'(doom|post-init doom|display-benchmark))
|
||||||
|
(require 'core-os)
|
||||||
(require 'core-ui)
|
(require 'core-ui)
|
||||||
(require 'core-editor)
|
(require 'core-editor)
|
||||||
(require 'core-projects)
|
(require 'core-projects)
|
||||||
|
|
|
@ -16,6 +16,10 @@ line or use --debug-init to enable this.")
|
||||||
(eval-when-compile (not (version< emacs-version "26"))))
|
(eval-when-compile (not (version< emacs-version "26"))))
|
||||||
(defconst EMACS27+
|
(defconst EMACS27+
|
||||||
(eval-when-compile (not (version< emacs-version "27"))))
|
(eval-when-compile (not (version< emacs-version "27"))))
|
||||||
|
(defconst IS-MAC (eq system-type 'darwin))
|
||||||
|
(defconst IS-LINUX (eq system-type 'gnu/linux))
|
||||||
|
(defconst IS-WINDOWS (memq system-type '(cygwin windows-nt ms-dos)))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
(defvar doom-emacs-dir
|
(defvar doom-emacs-dir
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue