2017-06-08 11:47:56 +02:00
|
|
|
;;; core-packages.el --- package management system -*- lexical-binding: t; -*-
|
2017-02-19 06:59:55 -05:00
|
|
|
|
2017-05-19 02:57:39 +02:00
|
|
|
;; Emacs package management is opinionated. Unfortunately, so am I. I've bound
|
|
|
|
;; together `use-package', `quelpa' and package.el to create my own,
|
|
|
|
;; rolling-release, lazily-loaded package management system for Emacs.
|
2017-02-11 06:00:08 -05:00
|
|
|
;;
|
2017-05-19 02:57:39 +02:00
|
|
|
;; The three key commands are `doom/packages-install', `doom/packages-update'
|
2017-07-02 16:47:02 +02:00
|
|
|
;; and `doom/packages-autoremove', which can be called via 'make' on the command
|
2017-05-19 02:57:39 +02:00
|
|
|
;; line (make {install,update,autoremove}). These read packages.el files in each
|
|
|
|
;; activated module in `doom-modules-dir' (and one in `doom-core-dir') which
|
|
|
|
;; tell DOOM what plugins to install and where from.
|
2017-01-16 23:15:48 -05:00
|
|
|
;;
|
2017-01-28 02:02:16 -05:00
|
|
|
;; Why all the trouble? Because:
|
2017-05-19 02:57:39 +02:00
|
|
|
;; 1. Scriptability: I live in the command line. I want a programmable
|
|
|
|
;; alternative to `list-packages' for updating and installing packages.
|
2017-05-19 22:29:47 +02:00
|
|
|
;; 2. Flexibility: I want packages from sources other than ELPA. Primarily
|
|
|
|
;; github, because certain plugins are out-of-date through official channels,
|
2017-07-02 16:47:02 +02:00
|
|
|
;; have changed hands, have a superior fork, or simply aren't in any ELPA
|
|
|
|
;; repo.
|
2017-05-19 02:57:39 +02:00
|
|
|
;; 3. Stability: I used Cask before this. It would error out with cyrptic errors
|
|
|
|
;; depending on the version of Emacs I used and the alignment of the planets.
|
|
|
|
;; No more.
|
|
|
|
;; 4. Performance: A minor point, but this system is lazy-loaded (more so if you
|
|
|
|
;; byte-compile). Not having to initialize package.el (or check that your
|
|
|
|
;; packages are installed) every time you start up Emacs affords us precious
|
|
|
|
;; seconds.
|
2017-06-05 16:45:19 +02:00
|
|
|
;; 5. Simplicity: No Cask, no external dependencies (unless you count make),
|
|
|
|
;; just Emacs. Arguably, my config is still over-complicated, but shhh, it's
|
|
|
|
;; fine. Everything is fine.
|
2017-02-06 00:13:24 -05:00
|
|
|
;;
|
2017-06-05 16:45:19 +02:00
|
|
|
;; You should be able to use package.el commands without any conflicts, but to
|
|
|
|
;; be absolutely certain use the doom alternatives:
|
2017-02-09 04:25:32 -05:00
|
|
|
;;
|
2017-05-19 22:29:47 +02:00
|
|
|
;; + `package-install': `doom/install-package'
|
|
|
|
;; + `package-reinstall': `doom/reinstall-package'
|
|
|
|
;; + `package-delete': `doom/delete-package'
|
|
|
|
;; + `package-update': `doom/update-package'
|
|
|
|
;; + `package-autoremove': `doom/packages-autoremove'
|
|
|
|
;; + `package-refresh-contents': `doom/refresh-packages'
|
2017-02-06 00:13:24 -05:00
|
|
|
;;
|
|
|
|
;; See core/autoload/packages.el for more functions.
|
2017-01-16 23:15:48 -05:00
|
|
|
|
2017-02-03 07:58:16 -05:00
|
|
|
(defvar doom-init-p nil
|
2017-06-12 00:20:30 +02:00
|
|
|
"Non-nil if doom is done initializing (once `doom-post-init-hook' is done). If
|
|
|
|
this is nil after Emacs has started something is wrong.")
|
|
|
|
|
|
|
|
(defvar doom-package-init-p nil
|
|
|
|
"If non-nil, doom's package system has been initialized (by
|
|
|
|
`doom-initialize'). This will be nill if you byte-compile your configuration (as
|
|
|
|
intended).")
|
2017-02-11 06:00:08 -05:00
|
|
|
|
2017-06-05 14:21:52 +02:00
|
|
|
(defvar doom-init-time nil
|
|
|
|
"The time it took, in seconds, for DOOM Emacs to initialize.")
|
|
|
|
|
|
|
|
(defvar doom-modules ()
|
2017-02-20 09:47:27 -05:00
|
|
|
"A hash table of enabled modules. Set by `doom-initialize-modules'.")
|
2017-01-31 04:31:14 -05:00
|
|
|
|
2017-06-05 14:21:52 +02:00
|
|
|
(defvar doom-packages ()
|
2017-02-11 06:00:08 -05:00
|
|
|
"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
|
2017-02-23 00:06:12 -05:00
|
|
|
`package!' declaration. Set by `doom-initialize-packages'.")
|
2017-02-11 06:00:08 -05:00
|
|
|
|
2017-04-11 08:42:51 -04:00
|
|
|
(defvar doom-core-packages
|
2017-02-20 21:57:39 +10:30
|
|
|
'(persistent-soft quelpa use-package)
|
2017-02-11 06:00:08 -05:00
|
|
|
"A list of packages that must be installed (and will be auto-installed if
|
|
|
|
missing) and shouldn't be deleted.")
|
|
|
|
|
2017-06-05 16:45:42 +02:00
|
|
|
(defvar doom-disabled-packages ()
|
|
|
|
"A list of packages that should be ignored by `def-package!'.")
|
|
|
|
|
2017-06-12 00:20:30 +02:00
|
|
|
(defvar doom-reload-hook nil
|
|
|
|
"A list of hooks to run when `doom/reload' is called.")
|
|
|
|
|
2017-03-05 13:32:12 -05:00
|
|
|
(defvar doom--site-load-path load-path
|
|
|
|
"The load path of built in Emacs libraries.")
|
|
|
|
|
2017-06-05 14:21:52 +02:00
|
|
|
(defvar doom--package-load-path ()
|
2017-03-05 13:32:12 -05:00
|
|
|
"The load path of package libraries installed via ELPA or QUELPA.")
|
|
|
|
|
2017-02-11 06:00:08 -05:00
|
|
|
(defvar doom--base-load-path
|
|
|
|
(append (list doom-core-dir doom-modules-dir)
|
2017-03-05 13:32:12 -05:00
|
|
|
doom--site-load-path)
|
2017-02-11 06:00:08 -05:00
|
|
|
"A backup of `load-path' before it was altered by `doom-initialize'. Used as a
|
2017-03-05 13:32:12 -05:00
|
|
|
base by `doom!' and for calculating how many packages exist.")
|
2017-01-16 23:15:48 -05:00
|
|
|
|
2017-06-06 12:01:10 +02:00
|
|
|
(defvar doom--refresh-p nil)
|
|
|
|
|
2017-06-08 11:47:56 +02:00
|
|
|
(setq load-prefer-newer (or noninteractive doom-debug-mode)
|
2017-01-16 23:15:48 -05:00
|
|
|
package--init-file-ensured t
|
|
|
|
package-user-dir (expand-file-name "elpa" doom-packages-dir)
|
|
|
|
package-enable-at-startup nil
|
|
|
|
package-archives
|
2017-05-19 22:28:01 +02:00
|
|
|
'(("gnu" . "https://elpa.gnu.org/packages/")
|
|
|
|
("melpa" . "https://melpa.org/packages/"))
|
2017-02-11 00:46:42 -05:00
|
|
|
;; I omit Marmalade because its packages are manually submitted rather
|
|
|
|
;; than pulled, so packages are often out of date with upstream.
|
2017-01-16 23:15:48 -05:00
|
|
|
|
2017-05-19 22:28:01 +02:00
|
|
|
;; security settings
|
2017-05-26 20:17:51 +02:00
|
|
|
gnutls-verify-error (not (getenv "INSECURE")) ; you shouldn't use this
|
2017-05-20 18:26:03 +02:00
|
|
|
tls-checktrust gnutls-verify-error
|
|
|
|
tls-program (list "gnutls-cli --x509cafile %t -p %p %h"
|
2017-05-26 20:17:51 +02:00
|
|
|
;; compatibility fallbacks
|
|
|
|
"gnutls-cli -p %p %h"
|
|
|
|
"openssl s_client -connect %h:%p -no_ssl2 -no_ssl3 -ign_eof")
|
2017-05-19 22:28:01 +02:00
|
|
|
|
2017-01-16 23:15:48 -05:00
|
|
|
use-package-always-defer t
|
2017-01-28 02:02:16 -05:00
|
|
|
use-package-always-ensure nil
|
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-03-01 19:16:49 -05:00
|
|
|
use-package-minimum-reported-time (if doom-debug-mode 0 0.1)
|
2017-02-06 01:23:24 -05:00
|
|
|
|
2017-06-05 16:45:19 +02:00
|
|
|
;; Don't track MELPA, we'll use package.el for that
|
2017-01-16 23:15:48 -05:00
|
|
|
quelpa-checkout-melpa-p nil
|
|
|
|
quelpa-update-melpa-p nil
|
2017-02-19 06:59:55 -05:00
|
|
|
quelpa-melpa-recipe-stores nil
|
|
|
|
quelpa-self-upgrade-p nil
|
2017-05-21 13:42:06 +02:00
|
|
|
quelpa-verbose doom-debug-mode
|
2017-01-31 18:59:58 -05:00
|
|
|
quelpa-dir (expand-file-name "quelpa" doom-packages-dir)
|
2017-02-06 01:23:24 -05:00
|
|
|
|
2017-04-06 19:43:56 -04:00
|
|
|
byte-compile-dynamic nil
|
|
|
|
byte-compile-verbose doom-debug-mode
|
2017-04-17 02:17:26 -04:00
|
|
|
byte-compile-warnings '(not free-vars unresolved noruntime lexical make-local))
|
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-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
|
2017-02-13 04:49:53 -05:00
|
|
|
are installed. If you byte-compile core/core.el, this function will be avoided
|
2017-02-11 05:59:16 -05:00
|
|
|
to speed up startup."
|
2017-02-13 04:49:53 -05:00
|
|
|
;; Called early during initialization; only use native functions!
|
2017-06-12 00:20:30 +02:00
|
|
|
(when (or (not doom-package-init-p) force-p)
|
2017-02-28 18:19:23 -05:00
|
|
|
(unless noninteractive
|
|
|
|
(message "Doom initialized"))
|
2017-02-21 00:47:34 -05:00
|
|
|
|
2017-02-03 07:58:16 -05:00
|
|
|
(setq load-path doom--base-load-path
|
2017-01-31 04:31:14 -05:00
|
|
|
package-activated-list nil)
|
2017-02-11 05:59:16 -05:00
|
|
|
|
2017-02-20 12:00:45 -05:00
|
|
|
;; Ensure core folders exist
|
2017-03-16 23:38:22 -04:00
|
|
|
(dolist (dir (list doom-local-dir doom-etc-dir doom-cache-dir package-user-dir))
|
2017-02-20 09:47:27 -05:00
|
|
|
(unless (file-directory-p dir)
|
|
|
|
(make-directory dir t)))
|
2017-02-11 05:59:16 -05:00
|
|
|
|
2017-02-03 19:20:47 -05:00
|
|
|
(package-initialize t)
|
2017-02-20 09:47:27 -05:00
|
|
|
;; Sure, we could let `package-initialize' fill `load-path', but package
|
|
|
|
;; activation costs precious milliseconds and does other stuff I don't
|
|
|
|
;; really care about (like load autoload files). My premature optimization
|
|
|
|
;; quota isn't filled yet.
|
2017-02-13 04:49:53 -05:00
|
|
|
;;
|
|
|
|
;; Also, in some edge cases involving package initialization during a
|
|
|
|
;; non-interactive session, `package-initialize' fails to fill `load-path'.
|
2017-02-20 09:47:27 -05:00
|
|
|
;; If we want something done right, do it ourselves!
|
2017-06-08 11:47:56 +02:00
|
|
|
(setq doom--package-load-path (directory-files package-user-dir t "^[^.]" t)
|
2017-03-05 13:32:12 -05:00
|
|
|
load-path (append load-path doom--package-load-path))
|
2017-02-06 00:13:24 -05:00
|
|
|
|
2017-02-09 04:25:32 -05:00
|
|
|
;; Ensure core packages are installed
|
2017-06-08 01:00:44 +02:00
|
|
|
(dolist (pkg doom-core-packages)
|
|
|
|
(unless (package-installed-p pkg)
|
|
|
|
(unless doom--refresh-p
|
|
|
|
(package-refresh-contents)
|
|
|
|
(setq doom--refresh-p t))
|
|
|
|
(let ((inhibit-message t))
|
|
|
|
(package-install pkg))
|
|
|
|
(if (package-installed-p pkg)
|
|
|
|
(message "Installed %s" pkg)
|
|
|
|
(error "Couldn't install %s" pkg))))
|
2017-02-03 07:58:16 -05:00
|
|
|
|
2017-04-05 19:40:34 -04:00
|
|
|
(load "quelpa" nil t)
|
|
|
|
(load "use-package" nil t)
|
2017-03-19 22:51:54 -04:00
|
|
|
|
2017-06-12 00:20:30 +02:00
|
|
|
(setq doom-package-init-p t)))
|
2017-02-03 07:58:16 -05:00
|
|
|
|
2017-06-08 11:47:56 +02:00
|
|
|
(defun doom-initialize-autoloads ()
|
2017-02-20 09:47:27 -05:00
|
|
|
"Ensures that `doom-autoload-file' exists and is loaded. Otherwise run
|
2017-02-11 06:00:08 -05:00
|
|
|
`doom/reload-autoloads' to generate it."
|
2017-02-20 13:12:24 -05:00
|
|
|
(unless (file-exists-p doom-autoload-file)
|
2017-02-23 00:06:12 -05:00
|
|
|
(quiet! (doom/reload-autoloads))))
|
2017-02-11 00:46:42 -05:00
|
|
|
|
2017-07-12 23:58:36 +02:00
|
|
|
(defun doom-initialize-packages (&optional force-p)
|
2017-06-05 16:45:19 +02:00
|
|
|
"Crawls across your emacs.d to fill `doom-modules' (from init.el) and
|
|
|
|
`doom-packages' (from packages.el files), if they aren't set already.
|
|
|
|
|
|
|
|
If FORCE-P is non-nil, do it even if they are.
|
|
|
|
|
|
|
|
This aggressively reloads core autoload files."
|
2017-02-11 00:46:42 -05:00
|
|
|
(doom-initialize force-p)
|
2017-07-12 23:58:36 +02:00
|
|
|
(unwind-protect
|
|
|
|
(let ((noninteractive t)
|
|
|
|
(load-fn
|
|
|
|
(lambda (file &optional noerror)
|
|
|
|
(condition-case-unless-debug ex
|
|
|
|
(load file noerror :nomessage :nosuffix)
|
|
|
|
('error
|
|
|
|
(error (format "(doom-initialize-packages) %s in %s: %s"
|
|
|
|
(car ex)
|
|
|
|
(file-relative-name file doom-emacs-dir)
|
|
|
|
(error-message-string ex))))))))
|
|
|
|
(when (or force-p (not doom-modules))
|
|
|
|
(setq doom-modules nil)
|
|
|
|
(funcall load-fn (expand-file-name "init.el" doom-emacs-dir)))
|
|
|
|
(when (or force-p (not doom-packages))
|
|
|
|
(setq doom-packages nil)
|
|
|
|
(funcall load-fn (expand-file-name "packages.el" doom-core-dir))
|
|
|
|
(dolist (file (doom--module-paths "packages.el"))
|
|
|
|
(funcall load-fn file t))))
|
|
|
|
(doom|finalize)))
|
2017-02-11 00:46:42 -05:00
|
|
|
|
2017-02-13 04:47:20 -05:00
|
|
|
(defun doom-initialize-modules (modules)
|
|
|
|
"Adds MODULES to `doom-modules'. MODULES must be in mplist format.
|
|
|
|
|
|
|
|
e.g '(:feature evil :lang emacs-lisp javascript java)"
|
|
|
|
(unless doom-modules
|
2017-04-17 02:17:10 -04:00
|
|
|
(setq doom-modules (make-hash-table :test #'equal :size (+ 5 (length modules)))))
|
2017-02-13 04:47:20 -05:00
|
|
|
(let (mode)
|
|
|
|
(dolist (m modules)
|
|
|
|
(cond ((keywordp m)
|
|
|
|
(setq mode m))
|
|
|
|
((not mode)
|
2017-02-23 00:06:12 -05:00
|
|
|
(error "No namespace specified on `doom!' for %s" m))
|
2017-02-13 04:47:20 -05:00
|
|
|
((eq m '*)
|
2017-02-19 06:59:55 -05:00
|
|
|
(doom-initialize-modules
|
2017-06-08 11:47:56 +02:00
|
|
|
(cl-loop with modpath = (expand-file-name (substring (symbol-name mode) 1) doom-modules-dir)
|
|
|
|
for path in (directory-files modpath t "^\\w")
|
|
|
|
if (file-directory-p path)
|
|
|
|
collect (intern (file-name-nondirectory path)) into paths
|
2017-06-24 16:51:37 +02:00
|
|
|
finally return (cons mode paths))))
|
2017-02-13 04:47:20 -05:00
|
|
|
(t
|
|
|
|
(doom--enable-module mode m))))))
|
|
|
|
|
2017-02-11 00:46:42 -05:00
|
|
|
(defun doom-module-path (module submodule &optional file)
|
|
|
|
"Get the full path to a module: e.g. :lang emacs-lisp maps to
|
|
|
|
~/.emacs.d/modules/lang/emacs-lisp/ and will append FILE if non-nil."
|
2017-06-05 00:47:56 +02:00
|
|
|
(when (keywordp module)
|
|
|
|
(setq module (substring (symbol-name module) 1)))
|
|
|
|
(when (symbolp submodule)
|
|
|
|
(setq submodule (symbol-name submodule)))
|
|
|
|
(expand-file-name (concat module "/" submodule "/" file)
|
|
|
|
doom-modules-dir))
|
2017-02-11 00:46:42 -05:00
|
|
|
|
2017-02-11 06:00:08 -05:00
|
|
|
(defun doom-module-loaded-p (module submodule)
|
2017-02-13 04:47:20 -05:00
|
|
|
"Returns t if MODULE->SUBMODULE is present in `doom-modules'."
|
2017-03-03 16:51:59 -05:00
|
|
|
(and doom-modules
|
|
|
|
(gethash (cons module submodule) doom-modules)))
|
2017-02-11 06:00:08 -05:00
|
|
|
|
|
|
|
(defun doom--module-pairs ()
|
2017-02-13 04:47:20 -05:00
|
|
|
"Returns `doom-modules' as a list of (MODULE . SUBMODULE) cons cells. The list
|
2017-06-14 12:17:36 +02:00
|
|
|
is sorted by order of insertion unless ALL-P is non-nil. If ALL-P is non-nil,
|
|
|
|
include all modules, enabled or otherwise."
|
|
|
|
(if (hash-table-p doom-modules)
|
|
|
|
(cl-loop for key being the hash-keys of doom-modules
|
|
|
|
collect (cons (car key) (cdr key)))
|
|
|
|
(error "doom-modules is uninitialized")))
|
2017-02-11 00:46:42 -05:00
|
|
|
|
2017-02-19 06:59:55 -05:00
|
|
|
(defun doom--module-paths (&optional append-file)
|
2017-06-14 21:03:20 +02:00
|
|
|
"Returns a list of absolute file paths to activated modules, with APPEND-FILE
|
|
|
|
added, if the file exists."
|
2017-02-19 06:59:55 -05:00
|
|
|
(let (paths)
|
2017-03-01 19:15:45 -05:00
|
|
|
(dolist (pair (doom--module-pairs) (nreverse paths))
|
2017-02-19 06:59:55 -05:00
|
|
|
(let ((path (doom-module-path (car pair) (cdr pair) append-file)))
|
|
|
|
(when (file-exists-p path)
|
2017-03-01 19:15:45 -05:00
|
|
|
(push path paths))))))
|
2017-02-19 06:59:55 -05:00
|
|
|
|
2017-02-11 06:00:08 -05:00
|
|
|
(defun doom--enable-module (module submodule &optional force-p)
|
|
|
|
"Adds MODULE and SUBMODULE to `doom-modules', if it isn't already there (or if
|
|
|
|
FORCE-P is non-nil). MODULE is a keyword, SUBMODULE is a symbol. e.g. :lang
|
|
|
|
'emacs-lisp.
|
2017-02-11 00:46:42 -05:00
|
|
|
|
2017-02-23 00:06:12 -05:00
|
|
|
Used by `require!' and `depends-on!'."
|
2017-02-11 00:46:42 -05:00
|
|
|
(unless (or force-p (doom-module-loaded-p module submodule))
|
2017-02-13 04:47:20 -05:00
|
|
|
(puthash (cons module submodule) t doom-modules)))
|
2017-02-06 00:13:24 -05:00
|
|
|
|
2017-02-19 06:59:55 -05:00
|
|
|
(defun doom--display-benchmark ()
|
|
|
|
(message "Loaded %s packages in %.03fs"
|
2017-04-05 14:26:04 -04:00
|
|
|
;; Certainly imprecise, especially where custom additions to
|
|
|
|
;; load-path are concerned, but I don't mind a [small] margin of
|
2017-06-05 16:45:19 +02:00
|
|
|
;; error in the plugin count in exchange for faster startup.
|
2017-04-05 14:26:04 -04:00
|
|
|
(- (length load-path) (length doom--base-load-path))
|
2017-02-20 16:42:07 -05:00
|
|
|
(setq doom-init-time (float-time (time-subtract after-init-time before-init-time)))))
|
2017-02-19 06:59:55 -05:00
|
|
|
|
2017-01-31 04:31:14 -05:00
|
|
|
|
|
|
|
;;
|
|
|
|
;; Macros
|
|
|
|
;;
|
2017-01-16 23:15:48 -05:00
|
|
|
|
2017-02-11 00:46:42 -05:00
|
|
|
(autoload 'use-package "use-package" nil nil 'macro)
|
2017-01-16 23:15:48 -05:00
|
|
|
|
2017-02-23 00:06:12 -05:00
|
|
|
(defmacro doom! (&rest modules)
|
2017-07-02 16:47:02 +02:00
|
|
|
"Bootstrap DOOM Emacs.
|
|
|
|
|
|
|
|
MODULES is an malformed plist of modules to load."
|
2017-02-13 04:47:20 -05:00
|
|
|
(doom-initialize-modules modules)
|
2017-06-14 12:17:36 +02:00
|
|
|
(when (and user-login-name
|
|
|
|
(not (doom-module-loaded-p :private (intern user-login-name))))
|
2017-06-10 18:21:59 +02:00
|
|
|
(doom--enable-module :private user-login-name))
|
2017-02-19 06:59:55 -05:00
|
|
|
`(let (file-name-handler-alist)
|
|
|
|
(setq doom-modules ',doom-modules)
|
2017-02-11 06:00:08 -05:00
|
|
|
|
2017-02-19 06:59:55 -05:00
|
|
|
(unless noninteractive
|
2017-07-12 23:56:19 +02:00
|
|
|
(require 'core-ui) ; draw me like one of your French editors
|
|
|
|
(require 'core-popups) ; taming sudden yet inevitable windows
|
|
|
|
(require 'core-editor) ; baseline configuration for text editing
|
|
|
|
(require 'core-projects) ; making Emacs project-aware
|
|
|
|
(require 'core-keybinds) ; centralized keybind system + which-key
|
|
|
|
|
2017-06-05 20:19:23 +02:00
|
|
|
(load ,(doom-module-path :private user-login-name "init") t t)
|
2017-06-08 11:47:56 +02:00
|
|
|
,@(cl-loop for (module . submodule) in (doom--module-pairs)
|
|
|
|
collect `(require! ,module ,submodule t))
|
2017-02-11 00:46:42 -05:00
|
|
|
|
|
|
|
(when (display-graphic-p)
|
|
|
|
(require 'server)
|
|
|
|
(unless (server-running-p)
|
|
|
|
(server-start)))
|
|
|
|
|
2017-06-12 15:13:30 +02:00
|
|
|
(add-hook 'doom-init-hook #'doom--display-benchmark t))))
|
2017-02-11 00:46:42 -05:00
|
|
|
|
2017-06-05 16:45:42 +02:00
|
|
|
(defmacro def-package! (name &rest plist)
|
2017-07-02 16:47:02 +02:00
|
|
|
"A thin wrapper around `use-package'.
|
|
|
|
|
|
|
|
Ignores the package if its NAME is present in `doom-disabled-packages'."
|
2017-06-05 16:45:42 +02:00
|
|
|
(when (and (memq name doom-disabled-packages)
|
|
|
|
(not (memq :disabled plist)))
|
|
|
|
(setq plist (append (list :disabled t) plist)))
|
|
|
|
`(use-package ,name ,@plist))
|
2017-02-11 00:46:42 -05:00
|
|
|
|
2017-06-05 14:22:30 +02:00
|
|
|
(defmacro def-package-hook! (package when &rest body)
|
2017-07-02 16:47:02 +02:00
|
|
|
"Reconfigures a package's `def-package!' block.
|
2017-06-05 14:22:30 +02:00
|
|
|
|
2017-07-02 16:47:02 +02:00
|
|
|
Under the hood, this uses use-package's `use-package-inject-hooks'.
|
|
|
|
|
|
|
|
PACKAGE is a symbol; the package's name.
|
2017-06-05 16:45:42 +02:00
|
|
|
WHEN should be one of the following:
|
2017-07-02 16:47:02 +02:00
|
|
|
:pre-init :post-init :pre-config :post-config :disable
|
|
|
|
|
|
|
|
If WHEN is :disable then BODY is ignored, and DOOM will be instructed to ignore
|
|
|
|
all `def-package!' blocks for PACKAGE.
|
2017-06-05 14:22:30 +02:00
|
|
|
|
2017-07-02 16:47:02 +02:00
|
|
|
WARNING: If :pre-init or :pre-config hooks return nil, the original
|
|
|
|
`def-package!''s :init/:config block (respectively) is overwritten, so remember
|
|
|
|
to have them return non-nil (or exploit that to overwrite Doom's config)."
|
2017-06-05 14:22:30 +02:00
|
|
|
(declare (indent defun))
|
2017-06-05 16:45:42 +02:00
|
|
|
(cond ((eq when :disable)
|
|
|
|
(push package doom-disabled-packages)
|
|
|
|
nil)
|
|
|
|
((memq when '(:pre-init :post-init :pre-config :post-config))
|
|
|
|
`(progn
|
|
|
|
(setq use-package-inject-hooks t)
|
|
|
|
(add-hook!
|
|
|
|
',(intern (format "use-package--%s--%s-hook"
|
|
|
|
package
|
|
|
|
(substring (symbol-name when) 1)))
|
|
|
|
,@body)))
|
|
|
|
(t
|
|
|
|
(error "'%s' isn't a valid hook for def-package-hook!" when))))
|
2017-06-05 14:22:30 +02:00
|
|
|
|
2017-02-23 00:06:12 -05:00
|
|
|
(defmacro load! (filesym &optional path noerror)
|
2017-07-02 16:38:28 +02:00
|
|
|
"Load a file relative to the current executing file (`load-file-name').
|
|
|
|
|
|
|
|
FILESYM is either a symbol or string representing the file to load. PATH is
|
|
|
|
where to look for the file (a string representing a directory path), by default
|
|
|
|
it is relative to `load-file-name', `byte-compile-current-file' or
|
|
|
|
`buffer-file-name' (in that order).
|
|
|
|
|
|
|
|
If NOERROR is non-nil, don't throw an error if the file doesn't exist."
|
2017-06-11 00:59:02 +02:00
|
|
|
(let ((path (or (and path (or (and (symbolp path) (symbol-value path))
|
|
|
|
(and (stringp path) path)
|
|
|
|
(and (listp path) (eval path))))
|
|
|
|
(and load-file-name (file-name-directory load-file-name))
|
2017-02-19 06:59:55 -05:00
|
|
|
(and (bound-and-true-p byte-compile-current-file)
|
2017-05-01 14:52:29 -04:00
|
|
|
(file-name-directory byte-compile-current-file))
|
2017-07-02 16:38:28 +02:00
|
|
|
(and buffer-file-name (file-name-directory buffer-file-name))))
|
|
|
|
(filename (cond ((stringp filesym) filesym)
|
|
|
|
((symbolp filesym) (symbol-name filesym))
|
|
|
|
(t (error "load! expected a string or symbol, got %s (a %s)"
|
|
|
|
filesym (type-of filesym))))))
|
2017-02-11 00:46:42 -05:00
|
|
|
(unless path
|
2017-07-02 16:38:28 +02:00
|
|
|
(error "Could not find %s" filename))
|
|
|
|
(let ((file (expand-file-name (concat filename ".el") path)))
|
2017-02-19 06:59:55 -05:00
|
|
|
(if (file-exists-p file)
|
2017-06-05 20:19:23 +02:00
|
|
|
`(load ,(file-name-sans-extension file) ,noerror ,(not doom-debug-mode))
|
2017-02-11 06:00:08 -05:00
|
|
|
(unless noerror
|
2017-02-23 00:06:12 -05:00
|
|
|
(error "Could not load! file %s" file))))))
|
2017-02-11 00:46:42 -05:00
|
|
|
|
2017-02-23 00:06:12 -05:00
|
|
|
(defmacro require! (module submodule &optional reload-p)
|
2017-07-02 16:47:02 +02:00
|
|
|
"Loads the module specified by MODULE (a property) and SUBMODULE (a symbol).
|
|
|
|
|
|
|
|
The module is only loaded once. If RELOAD-P is non-nil, load it again."
|
2017-06-14 20:26:17 +02:00
|
|
|
(let ((loaded-p (doom-module-loaded-p module submodule)))
|
|
|
|
(when (or reload-p (not loaded-p))
|
|
|
|
(unless loaded-p
|
|
|
|
(doom--enable-module module submodule t))
|
|
|
|
`(condition-case-unless-debug ex
|
|
|
|
(load! config ,(doom-module-path module submodule) t)
|
|
|
|
('error
|
|
|
|
(lwarn 'doom-modules :error
|
|
|
|
"%s in '%s %s' -> %s"
|
|
|
|
(car ex) ,module ',submodule (error-message-string ex)))))))
|
2017-02-11 00:46:42 -05:00
|
|
|
|
2017-02-23 00:06:12 -05:00
|
|
|
(defmacro featurep! (module submodule)
|
2017-07-02 16:47:02 +02:00
|
|
|
"Convenience macro wrapper for `doom-module-loaded-p'."
|
2017-06-24 02:12:11 +02:00
|
|
|
(doom-module-loaded-p module submodule))
|
2017-02-11 06:52:38 -05:00
|
|
|
|
2017-02-06 00:13:24 -05:00
|
|
|
|
2017-02-11 00:46:42 -05:00
|
|
|
;;
|
|
|
|
;; Declarative macros
|
|
|
|
;;
|
2017-01-16 23:15:48 -05:00
|
|
|
|
2017-02-23 00:06:12 -05:00
|
|
|
(defmacro package! (name &rest plist)
|
2017-07-02 16:47:02 +02:00
|
|
|
"Declares a package and how to install it (if applicable).
|
|
|
|
|
|
|
|
This macro is declarative and does not load nor install packages. It is used to
|
|
|
|
populate `doom-packages' with metadata about the packages Doom needs to keep
|
|
|
|
track of.
|
|
|
|
|
|
|
|
Only use this macro in a module's packages.el file.
|
2017-02-04 21:07:54 -05:00
|
|
|
|
2017-02-11 00:46:42 -05:00
|
|
|
Accepts the following properties:
|
2017-02-03 20:10:40 -05:00
|
|
|
|
2017-02-13 04:49:53 -05:00
|
|
|
:recipe RECIPE Takes a MELPA-style recipe (see `quelpa-recipe' in
|
|
|
|
`quelpa' for an example); for packages to be installed
|
|
|
|
from external sources.
|
2017-02-03 20:10:40 -05:00
|
|
|
:pin ARCHIVE-NAME Instructs ELPA to only look for this package in
|
2017-02-13 04:49:53 -05:00
|
|
|
ARCHIVE-NAME. e.g. \"org\". Ignored if RECIPE is present.
|
2017-07-02 16:47:02 +02:00
|
|
|
:ignore FORM Do not install this package if FORM is non-nil.
|
|
|
|
:freeze FORM Do not update this package if FORM is non-nil."
|
2017-01-16 23:15:48 -05:00
|
|
|
(declare (indent defun))
|
2017-02-19 19:00:58 -05:00
|
|
|
(let* ((old-plist (assq name doom-packages))
|
|
|
|
(pkg-recipe (or (plist-get plist :recipe)
|
|
|
|
(and old-plist (plist-get old-plist :recipe))))
|
|
|
|
(pkg-pin (or (plist-get plist :pin)
|
|
|
|
(and old-plist (plist-get old-plist :pin)))))
|
2017-02-20 01:13:21 -05:00
|
|
|
(when pkg-recipe
|
2017-03-01 19:15:45 -05:00
|
|
|
(when (= 0 (% (length pkg-recipe) 2))
|
2017-02-20 01:13:21 -05:00
|
|
|
(plist-put plist :recipe (cons name pkg-recipe)))
|
|
|
|
(when pkg-pin
|
|
|
|
(plist-put plist :pin nil)))
|
2017-06-22 23:59:34 +02:00
|
|
|
(dolist (prop '(:ignore :freeze))
|
|
|
|
(when-let (val (plist-get plist prop))
|
|
|
|
(plist-put plist prop (eval val))))
|
2017-02-19 19:00:58 -05:00
|
|
|
`(progn
|
|
|
|
(when ,(and pkg-pin t)
|
2017-04-18 05:45:24 -04:00
|
|
|
(cl-pushnew (cons ',name ,pkg-pin) package-pinned-packages
|
|
|
|
:test #'eq :key #'car))
|
2017-02-19 19:00:58 -05:00
|
|
|
(when ,(and old-plist t)
|
|
|
|
(assq-delete-all ',name doom-packages))
|
|
|
|
(push ',(cons name plist) doom-packages))))
|
2017-01-28 02:02:16 -05:00
|
|
|
|
2017-02-23 00:06:12 -05:00
|
|
|
(defmacro depends-on! (module submodule)
|
2017-07-02 16:47:02 +02:00
|
|
|
"Declares that this module depends on another.
|
|
|
|
|
|
|
|
Only use this macro in a module's packages.el file.
|
|
|
|
|
|
|
|
MODULE is a keyword, and SUBMODULE is a symbol. Under the hood, this simply
|
|
|
|
loads MODULE SUBMODULE's packages.el file."
|
2017-02-11 06:52:29 -05:00
|
|
|
(doom--enable-module module submodule)
|
2017-02-23 00:06:12 -05:00
|
|
|
`(load! packages ,(doom-module-path module submodule) t))
|
2017-01-31 19:42:11 -05:00
|
|
|
|
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-06-08 11:47:56 +02:00
|
|
|
(defun doom/reload ()
|
2017-07-02 16:47:02 +02:00
|
|
|
"Reload `load-path' and recompile files (if necessary).
|
|
|
|
|
|
|
|
Use this when `load-path' is out of sync with your plugins. This should only
|
|
|
|
happen if you manually modify/update/install packages from outside Emacs, while
|
|
|
|
an Emacs session is running.
|
|
|
|
|
|
|
|
This isn't necessary if you use Doom's package management commands because they
|
|
|
|
call `doom/reload' remotely (through emacsclient)."
|
2017-03-05 16:10:01 -05:00
|
|
|
(interactive)
|
2017-06-03 21:00:53 +02:00
|
|
|
(cond (noninteractive
|
|
|
|
(message "Reloading...")
|
|
|
|
(require 'server)
|
2017-06-08 11:47:56 +02:00
|
|
|
(unless (ignore-errors (server-eval-at "server" '(doom/reload)))
|
2017-06-03 21:00:53 +02:00
|
|
|
(message "Recompiling")
|
|
|
|
(doom/recompile)))
|
|
|
|
(t
|
|
|
|
(doom-initialize t)
|
|
|
|
(doom/recompile)
|
|
|
|
(message "Reloaded %d packages" (length doom--package-load-path))
|
|
|
|
(run-with-timer 1 nil #'redraw-display)
|
|
|
|
(run-hooks 'doom-reload-hook))))
|
2017-03-05 16:10:01 -05:00
|
|
|
|
2017-02-11 00:46:42 -05:00
|
|
|
(defun doom/reload-autoloads ()
|
2017-07-02 16:47:02 +02:00
|
|
|
"Refreshes the autoloads.el file, specified by `doom-autoload-file'.
|
2017-01-16 23:15:48 -05:00
|
|
|
|
2017-07-02 16:47:02 +02:00
|
|
|
It scans and reads core/autoload/*.el, modules/*/*/autoload.el and
|
|
|
|
modules/*/*/autoload/*.el, and generates an autoloads file at the path specified
|
|
|
|
by `doom-autoload-file'. This file tells Emacs where to find lazy-loaded
|
|
|
|
functions.
|
2017-02-03 19:20:47 -05:00
|
|
|
|
2017-07-02 16:47:02 +02:00
|
|
|
This should be run whenever init.el or an autoload file is modified. Running
|
|
|
|
'make autoloads' from the commandline executes this command."
|
2017-01-16 23:15:48 -05:00
|
|
|
(interactive)
|
2017-06-08 11:47:56 +02:00
|
|
|
;; This function must not use autoloaded functions or external dependencies.
|
|
|
|
;; It must assume nothing is set up!
|
2017-02-20 13:12:24 -05:00
|
|
|
(doom-initialize-packages (not noninteractive))
|
2017-06-24 02:12:11 +02:00
|
|
|
(let ((evil-p (doom-module-loaded-p :feature 'evil))
|
2017-06-08 11:47:56 +02:00
|
|
|
(targets
|
2017-02-19 06:59:55 -05:00
|
|
|
(file-expand-wildcards
|
|
|
|
(expand-file-name "autoload/*.el" doom-core-dir))))
|
|
|
|
(dolist (path (doom--module-paths))
|
|
|
|
(let ((auto-dir (expand-file-name "autoload" path))
|
|
|
|
(auto-file (expand-file-name "autoload.el" path)))
|
|
|
|
(when (file-exists-p auto-file)
|
2017-06-08 11:47:56 +02:00
|
|
|
(push auto-file targets))
|
2017-02-19 06:59:55 -05:00
|
|
|
(when (file-directory-p auto-dir)
|
2017-06-08 11:47:56 +02:00
|
|
|
(dolist (file (file-expand-wildcards (expand-file-name "*.el" auto-dir) t))
|
|
|
|
;; Make evil*.el autoload files a special case; don't load
|
|
|
|
;; them unless evil is enabled.
|
|
|
|
(unless (and (string-prefix-p "evil" (file-name-nondirectory file))
|
|
|
|
(not evil-p))
|
|
|
|
(push file targets))))))
|
|
|
|
(when (file-exists-p doom-autoload-file)
|
|
|
|
(delete-file doom-autoload-file)
|
2017-02-04 21:07:54 -05:00
|
|
|
(message "Deleted old autoloads.el"))
|
2017-06-14 12:17:36 +02:00
|
|
|
(dolist (file (reverse targets))
|
|
|
|
(message (if (update-file-autoloads file nil doom-autoload-file)
|
|
|
|
"Nothing in %s"
|
|
|
|
"Scanned %s")
|
|
|
|
(file-relative-name file doom-emacs-dir)))
|
|
|
|
(let ((buf (get-file-buffer doom-autoload-file))
|
|
|
|
current-sexp)
|
|
|
|
(unwind-protect
|
|
|
|
(condition-case-unless-debug ex
|
2017-02-20 13:12:24 -05:00
|
|
|
(with-current-buffer buf
|
|
|
|
(save-buffer)
|
2017-06-14 12:17:36 +02:00
|
|
|
(goto-char (point-min))
|
|
|
|
(while (re-search-forward "^(" nil t)
|
|
|
|
(save-excursion
|
|
|
|
(backward-char)
|
|
|
|
(setq current-sexp (read (thing-at-point 'sexp t)))
|
|
|
|
(eval current-sexp t))
|
|
|
|
(forward-char))
|
2017-02-20 13:12:24 -05:00
|
|
|
(message "Finished generating autoloads.el!"))
|
2017-06-14 12:17:36 +02:00
|
|
|
('error
|
|
|
|
(delete-file doom-autoload-file)
|
|
|
|
(error "Error in autoloads.el: (%s %s ...) %s -- %s"
|
|
|
|
(nth 0 current-sexp)
|
|
|
|
(nth 1 current-sexp)
|
|
|
|
(car ex) (error-message-string ex))))
|
|
|
|
(kill-buffer buf)))))
|
2017-02-20 13:12:24 -05:00
|
|
|
|
2017-04-06 19:43:56 -04:00
|
|
|
(defun doom/compile (&optional lite-p only-recompile-p)
|
2017-07-02 16:47:02 +02:00
|
|
|
"Byte compiles your emacs configuration.
|
2017-04-06 19:43:56 -04:00
|
|
|
|
2017-07-02 16:47:02 +02:00
|
|
|
Specifically, this byte-compiles init.el, core/*.el, core/autoload/*.el &
|
|
|
|
modules/*/*/**.el. It ignores unit tests and files with `no-byte-compile'
|
|
|
|
enabled.
|
|
|
|
|
|
|
|
DOOM Emacs was designed to benefit from byte-compilation, but the process may
|
|
|
|
take a while. Also, while your config files are byte-compiled, changes to them
|
|
|
|
will not take effect! Use `doom/clean-compiled' or `make clean' to undo
|
|
|
|
byte-compilation.
|
|
|
|
|
|
|
|
If LITE-P is non-nil, only compile the core DOOM files (init.el & core/**/*.el).
|
2017-04-06 19:43:56 -04:00
|
|
|
|
|
|
|
If ONLY-RECOMPILE-P is non-nil, only recompile out-of-date files."
|
|
|
|
(interactive "P")
|
|
|
|
;; Ensure all relevant config files are loaded and up-to-date. This way we
|
|
|
|
;; don't need eval-when-compile and require blocks scattered all over.
|
2017-07-12 23:58:36 +02:00
|
|
|
(doom-initialize-packages t)
|
2017-06-08 11:47:56 +02:00
|
|
|
(let ((targets
|
|
|
|
(cond ((equal (car command-line-args-left) "--")
|
2017-06-14 20:26:17 +02:00
|
|
|
(cl-loop for file in (cdr command-line-args-left)
|
2017-06-08 11:47:56 +02:00
|
|
|
if (file-exists-p file)
|
|
|
|
collect (expand-file-name file)
|
2017-06-14 12:17:36 +02:00
|
|
|
finally do (setq command-line-args-left nil)) )
|
2017-06-08 11:47:56 +02:00
|
|
|
(t
|
|
|
|
(append (list (expand-file-name "init.el" doom-emacs-dir)
|
|
|
|
doom-core-dir)
|
|
|
|
(unless lite-p (doom--module-paths))))))
|
2017-04-12 08:53:27 -04:00
|
|
|
(total-success 0)
|
|
|
|
(total-fail 0)
|
2017-06-14 12:17:36 +02:00
|
|
|
(total-nocomp 0)
|
|
|
|
(use-package-expand-minimally t))
|
2017-06-08 11:47:56 +02:00
|
|
|
(let ((el-files (cl-loop for path in targets
|
|
|
|
if (file-directory-p path)
|
|
|
|
nconc (nreverse (directory-files-recursively path "\\.el$"))
|
|
|
|
else if (file-exists-p path)
|
|
|
|
collect path)))
|
|
|
|
(dolist (file el-files)
|
|
|
|
(when (or (not only-recompile-p)
|
|
|
|
(let ((elc-file (byte-compile-dest-file file)))
|
|
|
|
(and (file-exists-p elc-file)
|
|
|
|
(file-newer-than-file-p file elc-file))))
|
|
|
|
(let ((result (byte-compile-file file))
|
|
|
|
(short-name (file-relative-name file doom-emacs-dir)))
|
|
|
|
(cl-incf
|
|
|
|
(cond ((eq result 'no-byte-compile)
|
|
|
|
(message! (dark (white "Ignored %s" short-name)))
|
|
|
|
total-nocomp)
|
|
|
|
((null result)
|
|
|
|
(message! (red "Failed to compile %s" short-name))
|
|
|
|
total-fail)
|
|
|
|
(t
|
|
|
|
(message! (green "Compiled %s" short-name))
|
|
|
|
total-success))))))
|
|
|
|
(message!
|
|
|
|
(bold
|
|
|
|
(color (if (= total-fail 0) 'green 'red)
|
|
|
|
"%s %s file(s) %s"
|
|
|
|
(if only-recompile-p "Recompiled" "Compiled")
|
|
|
|
(format (if el-files "%d/%d" "%d")
|
|
|
|
total-success
|
|
|
|
(- (length el-files) total-nocomp))
|
|
|
|
(format "(%s ignored)" total-nocomp)))))))
|
2017-03-25 01:03:02 -04:00
|
|
|
|
2017-03-28 15:53:47 -04:00
|
|
|
(defun doom/recompile ()
|
2017-07-02 16:47:02 +02:00
|
|
|
"Recompile any out-of-date compiled *.el files in your Emacs configuration."
|
2017-03-28 15:53:47 -04:00
|
|
|
(interactive)
|
2017-04-08 23:27:39 -04:00
|
|
|
(doom/compile nil :recompile)
|
|
|
|
;; In case `load-path' has changed (e.g. after an update)
|
|
|
|
(byte-recompile-file (expand-file-name "core.el" doom-core-dir) t))
|
2017-03-28 15:53:47 -04:00
|
|
|
|
2017-07-09 22:50:29 +02:00
|
|
|
(defun doom/reset ()
|
2017-07-02 16:47:02 +02:00
|
|
|
"Clear the local cache completely (in `doom-cache-dir').
|
|
|
|
|
2017-07-09 22:50:29 +02:00
|
|
|
This resets Emacs to a blank slate. You must restart Emacs for some components
|
|
|
|
to feel its effects."
|
2017-05-10 05:28:50 +02:00
|
|
|
(interactive)
|
2017-03-16 23:38:22 -04:00
|
|
|
(delete-directory doom-cache-dir t)
|
|
|
|
(make-directory doom-cache-dir t))
|
|
|
|
|
2017-07-09 22:52:28 +02:00
|
|
|
(defun doom/clean-compiled-files ()
|
2017-07-02 16:47:02 +02:00
|
|
|
"Delete all compiled elc files in your Emacs configuration.
|
|
|
|
|
|
|
|
This excludes compiled packages in `doom-packages-dir'."
|
2017-03-16 23:38:22 -04:00
|
|
|
(interactive)
|
2017-06-08 11:47:56 +02:00
|
|
|
(let ((targets (append (list (expand-file-name "init.elc" doom-emacs-dir))
|
|
|
|
(directory-files-recursively doom-core-dir "\\.elc$")
|
|
|
|
(directory-files-recursively doom-modules-dir "\\.elc$"))))
|
|
|
|
(unless (cl-loop for path in targets
|
|
|
|
if (file-exists-p path)
|
|
|
|
collect path
|
|
|
|
and do (delete-file path)
|
|
|
|
and do (message "Deleted %s" (file-relative-name path)))
|
2017-06-05 20:19:46 +02:00
|
|
|
(message "Everything is clean"))))
|
2017-03-16 23:38:22 -04:00
|
|
|
|
2017-02-11 00:46:42 -05:00
|
|
|
|
|
|
|
;;
|
|
|
|
;; Package.el modifications
|
|
|
|
;;
|
|
|
|
|
2017-03-27 13:05:30 -04:00
|
|
|
;; Updates QUELPA after deleting a package
|
2017-04-17 02:17:10 -04:00
|
|
|
(advice-add #'package-delete :after #'doom*package-delete)
|
2017-02-11 00:46:42 -05:00
|
|
|
|
2017-05-19 02:57:39 +02:00
|
|
|
;; It isn't safe to use `package-autoremove', so get rid of it
|
|
|
|
(advice-add #'package-autoremove :override #'doom/packages-autoremove)
|
|
|
|
|
2017-01-16 23:15:48 -05:00
|
|
|
(provide 'core-packages)
|
|
|
|
;;; core-packages.el ends here
|