core-packages: revise docstrings & comments

This commit is contained in:
Henrik Lissner 2018-05-24 21:17:23 +02:00
parent ea86b1075f
commit 8282280965
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -1,17 +1,17 @@
;;; core-packages.el --- package management system -*- lexical-binding: t; -*- ;;; core-packages.el --- package management system -*- lexical-binding: t; -*-
;; Emacs package management is opinionated. Unfortunately, so am I. I've bound ;; Emacs package management is opinionated, and so am I. I've bound together
;; together `use-package', `quelpa' and package.el to create my own, ;; `use-package', `quelpa' and package.el to create my own, rolling-release,
;; rolling-release, lazily-loaded package management system for Emacs. ;; lazily-loaded package management system for Emacs.
;; ;;
;; The three key commands are: ;; The three key commands are:
;; ;;
;; + `make install` or `doom//packages-install': Installs packages that are ;; + `bin/doom install` or `doom//packages-install': Installs packages that are
;; wanted, but not installed. ;; wanted, but not installed.
;; + `make update` or `doom//packages-update': Updates packages that are ;; + `bin/doom update` or `doom//packages-update': Updates packages that are
;; out-of-date. ;; out-of-date.
;; + `make autoremove` or `doom//packages-autoremove': Uninstalls packages that ;; + `bin/doom autoremove` or `doom//packages-autoremove': Uninstalls packages
;; are no longer needed. ;; that are no longer needed.
;; ;;
;; This system reads packages.el files located in each activated module (and one ;; This system reads packages.el files located in each activated module (and one
;; in `doom-core-dir'). These contain `package!' blocks that tell DOOM what ;; in `doom-core-dir'). These contain `package!' blocks that tell DOOM what
@ -164,8 +164,8 @@ If RETURN-P, return the message as a string instead of displaying it."
(run-hooks 'doom-post-init-hook)) (run-hooks 'doom-post-init-hook))
(defun doom|run-all-startup-hooks () (defun doom|run-all-startup-hooks ()
"Run all startup Emacs hooks. Meant to follow running Emacs in a vanilla "Run all startup Emacs hooks. Meant to be executed after starting Emacs with
session, with a different init.el, like so: -q or -Q, for example:
emacs -Q -l init.el -f doom|run-all-startup-hooks" emacs -Q -l init.el -f doom|run-all-startup-hooks"
(run-hooks 'after-init-hook 'delayed-warnings-hook (run-hooks 'after-init-hook 'delayed-warnings-hook
@ -495,6 +495,15 @@ added, if the file exists."
(autoload 'use-package "use-package-core" nil 'macro) (autoload 'use-package "use-package-core" nil 'macro)
;; Adds the :after-call custom keyword to `use-package' (and consequently,
;; `def-package!'). :after-call takes a symbol ro list of symbols. These symbols
;; can be functions to hook variables.
;;
;; (use-package X :after-call find-file-hook)
;;
;; This will load X on the first invokation of `find-file-hook' (then it will
;; remove itself from the hook).
(defvar doom--deferred-packages-alist ())
(after! use-package-core (after! use-package-core
(add-to-list 'use-package-deferring-keywords :after-call nil #'eq) (add-to-list 'use-package-deferring-keywords :after-call nil #'eq)
@ -504,9 +513,6 @@ added, if the file exists."
(defalias 'use-package-normalize/:after-call (defalias 'use-package-normalize/:after-call
'use-package-normalize-symlist) 'use-package-normalize-symlist)
(defvar doom--deferred-packages-alist ()
"TODO")
(defun use-package-handler/:after-call (name-symbol _keyword hooks rest state) (defun use-package-handler/:after-call (name-symbol _keyword hooks rest state)
(let ((fn (intern (format "doom|transient-hook--load-%s" name-symbol))) (let ((fn (intern (format "doom|transient-hook--load-%s" name-symbol)))
(hooks (delete-dups hooks))) (hooks (delete-dups hooks)))