From 27bfa14defb0350ebf6bb04d52dc766955758e01 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 5 Jun 2017 14:21:52 +0200 Subject: [PATCH] General refactor + cleanup --- core/autoload/packages.el | 2 +- core/core-os.el | 7 +------ core/core-packages.el | 12 ++++++------ core/packages.el | 7 ++++--- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/core/autoload/packages.el b/core/autoload/packages.el index f808222f8..3c529a9d1 100644 --- a/core/autoload/packages.el +++ b/core/autoload/packages.el @@ -224,7 +224,7 @@ Used by `doom/packages-install'." example; the package name can be omitted)." (doom-initialize-packages) (when (package-installed-p name) - (user-error "%s is already installed, skipping" name)) + (user-error "%s is already installed" name)) (let ((plist (or plist (cdr (assq name doom-packages)))) (inhibit-message (not doom-debug-mode)) (recipe (plist-get plist :recipe))) diff --git a/core/core-os.el b/core/core-os.el index 5f04d74d4..4e5c6c69b 100644 --- a/core/core-os.el +++ b/core/core-os.el @@ -3,12 +3,7 @@ (defconst IS-MAC (eq system-type 'darwin)) (defconst IS-LINUX (eq system-type 'gnu/linux)) -;; In case this config is shared across multiple computers (like mine are), -;; let's protect these from autoremoval. -(push 'exec-path-from-shell doom-protected-packages) -(push 'osx-clipboard doom-protected-packages) - - ;; clipboard +;; clipboard (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING) ;; Use a shared clipboard select-enable-clipboard t diff --git a/core/core-packages.el b/core/core-packages.el index 9ff9db98b..421e985f5 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -43,10 +43,13 @@ "Non-nil if doom's package system has been initialized (by `doom-initialize'). This will be nil if you have byte-compiled your configuration (as intended).") -(defvar doom-modules nil +(defvar doom-init-time nil + "The time it took, in seconds, for DOOM Emacs to initialize.") + +(defvar doom-modules () "A hash table of enabled modules. Set by `doom-initialize-modules'.") -(defvar doom-packages nil +(defvar doom-packages () "A list of enabled packages. Each element is a sublist, whose CAR is the package's name as a symbol, and whose CDR is the plist supplied to its `package!' declaration. Set by `doom-initialize-packages'.") @@ -56,13 +59,10 @@ package's name as a symbol, and whose CDR is the plist supplied to its "A list of packages that must be installed (and will be auto-installed if missing) and shouldn't be deleted.") -(defvar doom-init-time nil - "The time it took, in seconds, for DOOM Emacs to initialize.") - (defvar doom--site-load-path load-path "The load path of built in Emacs libraries.") -(defvar doom--package-load-path nil +(defvar doom--package-load-path () "The load path of package libraries installed via ELPA or QUELPA.") (defvar doom--base-load-path diff --git a/core/packages.el b/core/packages.el index 67a29e5b1..8fea508cc 100644 --- a/core/packages.el +++ b/core/packages.el @@ -7,9 +7,10 @@ (package! f) ;; core-os.el -(when IS-MAC - (package! exec-path-from-shell) - (package! osx-clipboard)) +;; In case this config is shared across multiple computers (like mine is), let's +;; protect these from autoremoval. +(package! exec-path-from-shell :ignore (not IS-MAC)) +(package! osx-clipboard :ignore (not IS-MAC)) ;; core-ui.el (package! highlight-indentation)