2017-01-16 23:15:48 -05:00
|
|
|
;;; core-packages.el
|
|
|
|
|
2017-01-31 19:42:41 -05:00
|
|
|
;; Emacs package management is opinionated. Unfortunately, so am I. So I
|
|
|
|
;; combined `use-package`, quelpa and package.el to manage my plugins.
|
2017-01-16 23:15:48 -05:00
|
|
|
;;
|
2017-01-28 02:02:16 -05:00
|
|
|
;; Why all the trouble? Because:
|
|
|
|
;; 1. Scriptability: I want my plugins managable from the command line (as well
|
2017-01-31 19:42:41 -05:00
|
|
|
;; as an `doom/packages-update' command within emacs to update my plugins
|
|
|
|
;; automatically, rather than through package.el's interface).
|
2017-01-28 02:02:16 -05:00
|
|
|
;; 2. Flexibility: I want to install packages from sources other than ELPA
|
|
|
|
;; repositories. Such as github or the Emacs wiki. Some plugins are out of
|
|
|
|
;; date through official channels, have changed hands unofficially, or simply
|
|
|
|
;; haven't been submitted to an ELPA repo yet.
|
2017-02-01 00:29:39 -05:00
|
|
|
;; 3. Stability: I don't want to worry that each time I use my package
|
|
|
|
;; manager something might inexplicably go wrong. This was the case with
|
|
|
|
;; Cask, which I used previously. package.el and quelpa appear to be much
|
|
|
|
;; more stable.
|
2017-01-28 02:02:16 -05:00
|
|
|
;; 4. No external dependencies (e.g. Cask) for plugin management.
|
2017-01-16 23:15:48 -05:00
|
|
|
|
2017-02-02 04:37:59 -05:00
|
|
|
(defvar doom-enabled-modules nil
|
2017-02-01 00:29:39 -05:00
|
|
|
"List of enabled modules; each element is a cons cell (MODULE . SUBMODULE),
|
|
|
|
where MODULE is the module's property symbol, e.g. :lang, and SUBMODULE is the
|
|
|
|
submodule symbol, e.g. 'evil.")
|
2017-01-16 23:15:48 -05:00
|
|
|
|
2017-02-02 04:37:59 -05:00
|
|
|
(defvar doom-packages nil
|
|
|
|
"A list of enabled packages.")
|
|
|
|
|
2017-02-03 07:58:16 -05:00
|
|
|
(defvar doom-protected-packages '(quelpa use-package dash f s)
|
2017-02-02 04:37:59 -05:00
|
|
|
"A list of packages that shouldn't be deleted.")
|
|
|
|
|
2017-02-03 07:58:16 -05:00
|
|
|
(defvar doom-init-p nil
|
2017-02-01 00:29:39 -05:00
|
|
|
"Non-nil if doom's package system has been initialized or not. It may not be
|
|
|
|
if you have byte-compiled your configuration (as intended).")
|
2017-01-31 04:31:14 -05:00
|
|
|
|
2017-02-03 07:58:16 -05:00
|
|
|
(defvar doom-dont-load-p nil
|
|
|
|
"If non-nil, run DOOM emacs in declarative mode, meaning: don't actually load
|
|
|
|
anything, just track what should be loaded. Useful for scanning packages and
|
|
|
|
loaded modules.")
|
2017-02-01 00:29:39 -05:00
|
|
|
|
2017-02-03 19:20:47 -05:00
|
|
|
(defvar doom-reloading-p nil
|
|
|
|
"If non-nil, DOOM is reloading itself. Use this to determine to prevent
|
|
|
|
infinite recursion.")
|
|
|
|
|
2017-02-03 07:58:16 -05:00
|
|
|
(defvar doom-prefer-el-p noninteractive
|
2017-02-02 04:37:59 -05:00
|
|
|
"If non-nil, load uncompiled .el config files.")
|
2017-01-31 18:47:59 -05:00
|
|
|
|
2017-02-03 07:58:16 -05:00
|
|
|
(defvar doom--base-load-path (append (list doom-core-dir
|
|
|
|
doom-modules-dir)
|
|
|
|
load-path)
|
2017-01-31 04:31:14 -05:00
|
|
|
"A backup of `load-path', used as a bare-bones foundation for
|
|
|
|
`doom/packages-reload' or `doom-initialize'.")
|
2017-01-16 23:15:48 -05:00
|
|
|
|
|
|
|
(setq load-prefer-newer nil
|
|
|
|
package--init-file-ensured t
|
|
|
|
package-user-dir (expand-file-name "elpa" doom-packages-dir)
|
|
|
|
package-enable-at-startup nil
|
|
|
|
package-archives
|
|
|
|
'(("gnu" . "http://elpa.gnu.org/packages/")
|
|
|
|
("melpa" . "http://melpa.org/packages/")
|
|
|
|
("org" . "http://orgmode.org/elpa/"))
|
|
|
|
|
|
|
|
use-package-always-defer t
|
2017-01-28 02:02:16 -05:00
|
|
|
use-package-always-ensure nil
|
2017-02-02 04:37:59 -05:00
|
|
|
use-package-expand-minimally t
|
2017-02-02 21:54:47 -05:00
|
|
|
use-package-debug nil
|
2017-01-31 04:31:14 -05:00
|
|
|
use-package-verbose doom-debug-mode
|
2017-01-16 23:15:48 -05:00
|
|
|
quelpa-checkout-melpa-p nil
|
|
|
|
quelpa-update-melpa-p nil
|
2017-01-31 18:59:58 -05:00
|
|
|
quelpa-dir (expand-file-name "quelpa" doom-packages-dir)
|
|
|
|
;; ssh, no tears. Only compiling.
|
|
|
|
byte-compile-warnings
|
|
|
|
'(unresolved callargs obsolete noruntime cl-functions make-local constants suspicious))
|
2017-01-16 23:15:48 -05:00
|
|
|
|
|
|
|
|
|
|
|
;;
|
2017-01-31 04:31:14 -05:00
|
|
|
;; Bootstrap function
|
2017-01-16 23:15:48 -05:00
|
|
|
;;
|
|
|
|
|
2017-02-04 02:55:05 -05:00
|
|
|
(autoload 'use-package "use-package" nil nil 'macro)
|
|
|
|
|
2017-01-31 18:47:59 -05:00
|
|
|
(defmacro doom! (&rest packages)
|
|
|
|
"DOOM Emacs bootstrap macro. List the modules to load. Benefits from
|
|
|
|
byte-compilation."
|
|
|
|
(let (mode)
|
|
|
|
(dolist (p packages)
|
|
|
|
(cond ((string-prefix-p ":" (symbol-name p))
|
|
|
|
(setq mode p))
|
|
|
|
((not mode)
|
|
|
|
(error "No namespace specified on `doom!' for %s" p))
|
|
|
|
(t
|
2017-02-02 04:37:59 -05:00
|
|
|
(setq doom-enabled-modules (append doom-enabled-modules (list (cons mode p))))))))
|
2017-02-03 07:58:16 -05:00
|
|
|
`(unless doom-dont-load-p
|
2017-02-02 04:37:59 -05:00
|
|
|
(let (file-name-handler-alist)
|
2017-02-02 19:16:12 -05:00
|
|
|
,@(mapcar (lambda (pkg) `(load! ,(car pkg) ,(cdr pkg)))
|
2017-02-02 04:37:59 -05:00
|
|
|
doom-enabled-modules)
|
2017-01-31 18:47:59 -05:00
|
|
|
|
2017-02-02 04:37:59 -05:00
|
|
|
(when (display-graphic-p)
|
|
|
|
(require 'server)
|
|
|
|
(unless (server-running-p)
|
|
|
|
(server-start)))
|
2017-01-31 18:47:59 -05:00
|
|
|
|
2017-02-02 04:37:59 -05:00
|
|
|
;; Prevent any auto-displayed text + benchmarking
|
|
|
|
(advice-add 'display-startup-echo-area-message :override 'ignore)
|
|
|
|
(message "Loaded %s packages in %s"
|
2017-02-03 07:58:16 -05:00
|
|
|
(- (length load-path) (length doom--base-load-path))
|
2017-02-02 04:37:59 -05:00
|
|
|
(emacs-init-time)))))
|
2017-01-31 04:31:14 -05:00
|
|
|
|
|
|
|
(defun doom-initialize (&optional force-p)
|
2017-02-02 04:37:59 -05:00
|
|
|
"Initialize installed packages (using package.el) and ensure the core packages
|
|
|
|
are installed. If you byte compile core/core.el, calls to `package.el' are
|
|
|
|
avoided to speed up startup."
|
2017-02-03 07:58:16 -05:00
|
|
|
(unless (or doom-init-p force-p)
|
|
|
|
(setq load-path doom--base-load-path
|
2017-01-31 04:31:14 -05:00
|
|
|
package-activated-list nil)
|
2017-02-03 19:20:47 -05:00
|
|
|
(package-initialize t)
|
|
|
|
;; Sure, package-initialize fills the load-path, but it will error out on
|
|
|
|
;; missing packages. UNACCEPTAABBLLLE!
|
|
|
|
(setq load-path
|
|
|
|
(append load-path
|
|
|
|
(directory-files package-user-dir t "^[a-zA-Z0-9]" t)))
|
|
|
|
|
2017-02-02 04:37:59 -05:00
|
|
|
(unless (and (file-exists-p doom-packages-dir)
|
2017-02-03 07:58:16 -05:00
|
|
|
(require 'use-package nil t)
|
|
|
|
(require 'quelpa nil t))
|
2017-01-31 04:31:14 -05:00
|
|
|
(package-refresh-contents)
|
2017-02-02 04:37:59 -05:00
|
|
|
;; Ensure core packages are installed
|
2017-02-03 07:58:16 -05:00
|
|
|
(condition-case ex
|
|
|
|
(mapc (lambda (pkg)
|
|
|
|
(package-install pkg)
|
|
|
|
(unless (package-installed-p pkg)
|
|
|
|
(error "Couldn't install %s" pkg)))
|
|
|
|
doom-protected-packages)
|
2017-02-03 20:10:03 -05:00
|
|
|
(error
|
2017-02-03 07:58:16 -05:00
|
|
|
(delete-directory doom-packages-dir t)
|
|
|
|
(error "There was an error initializing DOOM. Try running it again"))))
|
|
|
|
|
|
|
|
(require 'quelpa)
|
|
|
|
(require 'use-package)
|
2017-02-03 19:20:47 -05:00
|
|
|
(advice-add 'package-delete :after 'doom*package-delete)
|
2017-02-03 07:58:16 -05:00
|
|
|
;; Remove package management keywords, I'll deal with the myself
|
|
|
|
(mapc (lambda (keyword) (setq use-package-keywords (delq keyword use-package-keywords)))
|
|
|
|
'(:ensure :pin))
|
|
|
|
(setq doom-init-p t)))
|
|
|
|
|
|
|
|
(defun doom-reload ()
|
|
|
|
"Rereads the Emacs config, reloading `doom-packages' and
|
|
|
|
`doom-enabled-modules'."
|
2017-02-03 19:20:47 -05:00
|
|
|
(unless doom-reloading-p
|
|
|
|
(doom-initialize)
|
|
|
|
(let ((doom-prefer-el-p t)
|
|
|
|
(doom-dont-load-p t)
|
|
|
|
(doom-reloading-p t)
|
|
|
|
noninteractive)
|
|
|
|
(setq doom-enabled-modules nil
|
|
|
|
doom-packages nil)
|
|
|
|
(let ((load-fn (lambda (file) (load file :noerror (not doom-debug-mode) :nosuffix))))
|
|
|
|
(mapc load-fn
|
|
|
|
(list (f-expand "init.el" doom-emacs-dir)
|
|
|
|
(f-expand "core.el" doom-core-dir)))
|
|
|
|
(mapc load-fn
|
|
|
|
(--map (doom-module-path (car it) (cdr it) "packages.el")
|
|
|
|
doom-enabled-modules))))))
|
2017-02-02 04:37:59 -05:00
|
|
|
|
2017-01-31 04:31:14 -05:00
|
|
|
|
|
|
|
;;
|
|
|
|
;; Macros
|
|
|
|
;;
|
2017-01-16 23:15:48 -05:00
|
|
|
|
2017-02-02 04:37:59 -05:00
|
|
|
(defvar __DIR__ nil "The directory of the currently loaded file (set by `load!')")
|
|
|
|
(defvar __FILE__ nil "The full path of the currently loaded file (set by `load!')")
|
2017-02-03 07:58:16 -05:00
|
|
|
(defvar __PACKAGE__ nil "The name of the current package.")
|
2017-01-16 23:15:48 -05:00
|
|
|
|
2017-02-02 04:37:59 -05:00
|
|
|
(defmacro use-package! (name &rest plist)
|
2017-02-03 07:58:16 -05:00
|
|
|
"A `use-package' wrapper. It exists so configs can adhere to the naming
|
|
|
|
conventions of DOOM emacs, as well as let-bind `__PACKAGE__' for the containing
|
|
|
|
forms. This is helpful for macros like `set!' and `add-hook!'. Note that
|
|
|
|
packages are deferred by default."
|
2017-02-03 19:20:47 -05:00
|
|
|
(declare (indent defun))
|
2017-02-03 07:58:16 -05:00
|
|
|
`(let ((__PACKAGE__ ',name))
|
2017-02-02 19:16:12 -05:00
|
|
|
(use-package ,name ,@plist)))
|
2017-01-16 23:15:48 -05:00
|
|
|
|
2017-02-01 00:29:39 -05:00
|
|
|
(defmacro package! (name &rest plist)
|
2017-02-03 19:20:47 -05:00
|
|
|
"Wraps around `use-package' to declare a deferred package (unless otherwise
|
2017-02-03 20:10:40 -05:00
|
|
|
indicated), takes the same arguments, but adds a few custom properties:
|
|
|
|
|
|
|
|
:recipe RECIPE Takes a MELPA-style recipe (see `quelpa-recipe' for an
|
|
|
|
example); for packages to be installed from external
|
|
|
|
sources.
|
|
|
|
:pin ARCHIVE-NAME Instructs ELPA to only look for this package in
|
|
|
|
ARCHIVE-NAME. e.g. \"org\".
|
|
|
|
:needs FEATURE Don't install this package if FEATURE isn't available.
|
|
|
|
|
|
|
|
Also binds `__PACKAGE__` for PLIST forms to optionally use."
|
2017-01-16 23:15:48 -05:00
|
|
|
(declare (indent defun))
|
2017-02-03 07:58:16 -05:00
|
|
|
(let ((recipe (cadr (memq :recipe plist)))
|
2017-02-03 19:20:47 -05:00
|
|
|
(pin (cadr (memq :pin plist)))
|
2017-02-03 20:10:40 -05:00
|
|
|
(lpath (cadr (memq :load-path plist)))
|
|
|
|
(dep (cadr (memq :needs plist))))
|
|
|
|
(when (or (not dep)
|
|
|
|
(or (featurep dep)
|
|
|
|
(package-installed-p dep)))
|
|
|
|
(when (and recipe (= 0 (mod (length recipe) 2)))
|
|
|
|
(push name recipe))
|
|
|
|
(if (not lpath)
|
|
|
|
(cl-pushnew (cons name recipe) doom-packages :key 'car)
|
|
|
|
(cl-pushnew lpath doom--base-load-path)
|
|
|
|
(setq recipe nil
|
|
|
|
pin nil))
|
|
|
|
(when pin
|
|
|
|
(cl-pushnew (cons package (plist-get plist :pin)) package-pinned-packages :key 'car))
|
|
|
|
(setq plist (use-package-plist-delete plist :recipe))
|
|
|
|
(setq plist (use-package-plist-delete plist :pin))
|
|
|
|
(unless doom-dont-load-p
|
|
|
|
`(use-package! ,name ,@plist)))))
|
2017-01-31 04:31:14 -05:00
|
|
|
|
2017-02-02 21:55:25 -05:00
|
|
|
(defmacro require! (feature)
|
2017-02-03 19:20:47 -05:00
|
|
|
"Like `require', but will prefer uncompiled files if `doom-prefer-el-p' is
|
|
|
|
non-nil or this is a noninteractive session."
|
2017-02-03 07:58:16 -05:00
|
|
|
(let ((prefer-el-p (or doom-prefer-el-p noninteractive)))
|
2017-02-02 21:55:25 -05:00
|
|
|
`(require ',feature
|
|
|
|
,(locate-file (concat (symbol-name feature) (if prefer-el-p ".el"))
|
|
|
|
load-path))))
|
|
|
|
|
2017-02-03 19:20:47 -05:00
|
|
|
(defmacro load! (module &optional submodule file)
|
|
|
|
"Load a module from `doom-modules-dir' when both MODULE and SUBMODULE is
|
|
|
|
provided (both symbols). If FILE is non-nil, append it to the resulting path. If
|
|
|
|
SUBMODULE is nil, MODULE is loaded relative to the current file (see `__DIR__').
|
|
|
|
When SUBMODULE is nil, FILE isn't used.
|
|
|
|
|
|
|
|
Will prefer uncompiled elisp sources if `doom-prefer-el-p' is non-nil or this is
|
|
|
|
an noninteractive session.
|
2017-01-28 02:02:16 -05:00
|
|
|
|
|
|
|
Examples:
|
2017-02-02 04:37:59 -05:00
|
|
|
(load! :lang emacs-lisp)
|
2017-02-01 00:29:39 -05:00
|
|
|
|
2017-02-02 04:37:59 -05:00
|
|
|
Loads modules/lang/emacs-lisp/FILE.el (defaults to config.el).
|
2017-02-01 00:29:39 -05:00
|
|
|
|
2017-02-02 04:37:59 -05:00
|
|
|
(load! +local-module)
|
2017-01-31 04:31:14 -05:00
|
|
|
|
2017-02-02 04:37:59 -05:00
|
|
|
Loads +local-module.el relative to `__DIR__' or `doom-core-dir'."
|
2017-02-03 07:58:16 -05:00
|
|
|
(let ((prefer-el-p (or doom-prefer-el-p noninteractive))
|
2017-02-02 21:56:08 -05:00
|
|
|
path file)
|
2017-01-31 04:31:14 -05:00
|
|
|
(cond ((null submodule)
|
2017-02-02 21:56:08 -05:00
|
|
|
(setq path __DIR__
|
2017-02-03 19:20:47 -05:00
|
|
|
file (concat (symbol-name module) ".el")))
|
2017-01-31 04:31:14 -05:00
|
|
|
(t
|
2017-02-03 19:20:47 -05:00
|
|
|
(cl-pushnew (cons module submodule)
|
|
|
|
doom-enabled-modules
|
|
|
|
:test (lambda (x y) (and (eq (car x) (car y))
|
|
|
|
(eq (cdr x) (cdr y)))))
|
|
|
|
(setq path (doom-module-path module submodule)
|
2017-02-02 04:37:59 -05:00
|
|
|
file (or file "config.el"))))
|
2017-01-31 04:31:14 -05:00
|
|
|
(setq path (f-slash path)
|
|
|
|
file (concat path file))
|
2017-02-02 04:37:59 -05:00
|
|
|
`(let ((__FILE__ ,file)
|
|
|
|
(__DIR__ ,path))
|
2017-02-03 07:58:16 -05:00
|
|
|
(load ,(if doom-prefer-el-p file (f-no-ext file))
|
|
|
|
nil (not doom-debug-mode) ,doom-prefer-el-p))))
|
2017-01-28 02:02:16 -05:00
|
|
|
|
2017-01-31 19:42:11 -05:00
|
|
|
(defun doom-module-path (module submodule &optional file)
|
2017-02-02 04:37:59 -05:00
|
|
|
"Get the full path to a module: e.g. :lang emacs-lisp maps to
|
|
|
|
~/.emacs.d/modules/lang/emacs-lisp/. Will append FILE if non-nil."
|
2017-02-02 19:17:02 -05:00
|
|
|
(setq module
|
|
|
|
(cond ((keywordp module) (substring (symbol-name module) 1))
|
2017-02-03 07:58:16 -05:00
|
|
|
((symbolp module) (symbol-name module))
|
2017-02-02 19:17:02 -05:00
|
|
|
((stringp module) module)
|
|
|
|
(t (error "Not a valid module name: %s" module))))
|
2017-02-02 04:37:59 -05:00
|
|
|
(when (symbolp submodule)
|
|
|
|
(setq submodule (symbol-name submodule)))
|
|
|
|
(f-expand (concat module "/" submodule "/" file)
|
2017-01-31 19:42:11 -05:00
|
|
|
doom-modules-dir))
|
|
|
|
|
2017-01-31 04:31:14 -05:00
|
|
|
|
|
|
|
;;
|
2017-02-03 07:58:16 -05:00
|
|
|
;; Commands
|
2017-01-31 04:31:14 -05:00
|
|
|
;;
|
|
|
|
|
2017-02-03 07:58:16 -05:00
|
|
|
(defun doom/reload ()
|
|
|
|
"Reload `load-path' by scanning all packages. Run this if you ran make update
|
|
|
|
or make clean outside of Emacs."
|
|
|
|
(interactive)
|
|
|
|
(doom-initialize t)
|
|
|
|
(message "Reloaded %s packages" (length package-alist)))
|
|
|
|
|
2017-02-02 04:37:59 -05:00
|
|
|
(defun doom/refresh-autoloads ()
|
|
|
|
"Refreshes the autoloads.el file, which tells Emacs where to find all the
|
|
|
|
autoloaded functions in the modules you use or among the core libraries.
|
2017-01-16 23:15:48 -05:00
|
|
|
|
2017-02-03 19:20:47 -05:00
|
|
|
In modules, checks for modules/*/autoload.el and modules/*/autoload/*.el.
|
|
|
|
|
2017-02-02 04:37:59 -05:00
|
|
|
Rerun this whenever you modify your init.el (or use `make autoloads` from the
|
|
|
|
command line)."
|
2017-01-16 23:15:48 -05:00
|
|
|
(interactive)
|
2017-02-03 19:20:47 -05:00
|
|
|
(unless doom-reloading-p
|
|
|
|
(doom-reload)
|
|
|
|
(let ((generated-autoload-file (concat doom-local-dir "autoloads.el"))
|
|
|
|
(autoload-files
|
|
|
|
(append (-flatten (mapcar (lambda (dir)
|
|
|
|
(let ((auto-dir (f-expand "autoload" dir))
|
|
|
|
(auto-file (f-expand "autoload.el" dir)))
|
|
|
|
(cond ((f-directory-p auto-dir)
|
|
|
|
(f-glob "*.el" auto-dir))
|
|
|
|
((f-exists-p auto-file)
|
|
|
|
auto-file))))
|
|
|
|
(--map (doom-module-path (car it) (cdr it)) doom-enabled-modules)))
|
|
|
|
(f-glob "autoload/*.el" doom-core-dir))))
|
|
|
|
(when (f-exists-p generated-autoload-file)
|
|
|
|
(f-delete generated-autoload-file)
|
|
|
|
(message "Deleted old autoloads.el"))
|
|
|
|
(dolist (file autoload-files)
|
|
|
|
(update-file-autoloads file)
|
2017-02-04 02:55:47 -05:00
|
|
|
(message "Scanned %s" (f-relative file doom-emacs-dir)))
|
2017-02-03 19:20:47 -05:00
|
|
|
(with-current-buffer (get-file-buffer generated-autoload-file)
|
|
|
|
(save-buffer)
|
|
|
|
(eval-buffer))
|
|
|
|
(message "Done!"))))
|
2017-01-16 23:15:48 -05:00
|
|
|
|
2017-02-02 21:56:40 -05:00
|
|
|
(defun doom/byte-compile (&optional comprehensive-p)
|
2017-01-31 19:44:31 -05:00
|
|
|
"Byte (re)compile the important files in your emacs configuration (i.e.
|
|
|
|
init.el, core/*.el and modules/*/*/config.el) DOOM Emacs was designed to benefit
|
2017-02-02 21:56:40 -05:00
|
|
|
a lot from this.
|
|
|
|
|
2017-02-03 19:20:47 -05:00
|
|
|
If COMPREHENSIVE-P is non-nil, then compile modules/*/*/*.el (except for
|
2017-02-04 02:55:47 -05:00
|
|
|
packages.el files) -- this will likely take a long time."
|
2017-01-16 23:15:48 -05:00
|
|
|
(interactive)
|
2017-02-03 07:58:16 -05:00
|
|
|
(doom-reload)
|
|
|
|
(let ((targets (append
|
|
|
|
(list (f-expand "init.el" doom-emacs-dir)
|
|
|
|
(f-expand "core.el" doom-core-dir))
|
|
|
|
(f-glob "core-*.el" doom-core-dir)
|
|
|
|
(-flatten
|
|
|
|
(--map (f--entries (doom-module-path (car it) (cdr it))
|
|
|
|
(and (f-ext-p it "el")
|
2017-02-04 02:55:47 -05:00
|
|
|
(or comprehensive-p
|
|
|
|
(string= (f-base it) "config")
|
|
|
|
(string-prefix-p "+" (f-base it))))
|
2017-02-03 07:58:16 -05:00
|
|
|
t)
|
|
|
|
doom-enabled-modules))))
|
|
|
|
(n 0)
|
|
|
|
results)
|
2017-02-02 04:37:59 -05:00
|
|
|
(mapc (lambda (file)
|
|
|
|
(push (cons (f-relative file doom-emacs-dir)
|
2017-02-02 21:56:40 -05:00
|
|
|
(when (byte-recompile-file file nil 0)
|
2017-02-02 04:37:59 -05:00
|
|
|
(setq n (1+ n))
|
|
|
|
t))
|
|
|
|
results))
|
|
|
|
targets)
|
2017-01-31 19:44:31 -05:00
|
|
|
(when noninteractive
|
|
|
|
(when targets (message "\n"))
|
2017-02-02 04:37:59 -05:00
|
|
|
(message "Compiling %s files:\n%s" n
|
|
|
|
(mapconcat (lambda (file) (concat "+ " (if (cdr file) "SUCCESS" "FAIL") ": " (car file)))
|
|
|
|
(reverse results) "\n")))))
|
2017-01-16 23:15:48 -05:00
|
|
|
|
|
|
|
(provide 'core-packages)
|
|
|
|
;;; core-packages.el ends here
|