Cheer up the byte-compiler
You deserve better than those warnings.
This commit is contained in:
parent
25beb4bcfd
commit
388e0def2c
3 changed files with 16 additions and 15 deletions
|
@ -61,14 +61,15 @@ If a mode is quoted, it is left as is."
|
||||||
else collect (intern (format "%s-hook" (symbol-name hook)))))
|
else collect (intern (format "%s-hook" (symbol-name hook)))))
|
||||||
|
|
||||||
(defun doom--assert-stage-p (stage macro)
|
(defun doom--assert-stage-p (stage macro)
|
||||||
(cl-assert (eq stage doom--stage)
|
(unless (bound-and-true-p byte-compile-current-file)
|
||||||
nil
|
(cl-assert (eq stage doom--stage)
|
||||||
"Found %s call in non-%s.el file (%s)"
|
nil
|
||||||
macro (symbol-name stage)
|
"Found %s call in non-%s.el file (%s)"
|
||||||
(let ((path (FILE!)))
|
macro (symbol-name stage)
|
||||||
(if (file-in-directory-p path doom-emacs-dir)
|
(let ((path (FILE!)))
|
||||||
(file-relative-name path doom-emacs-dir)
|
(if (file-in-directory-p path doom-emacs-dir)
|
||||||
(abbreviate-file-name path)))))
|
(file-relative-name path doom-emacs-dir)
|
||||||
|
(abbreviate-file-name path))))))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -205,14 +205,14 @@ elsewhere."
|
||||||
(pop plist))
|
(pop plist))
|
||||||
(setq plist old-plist)
|
(setq plist old-plist)
|
||||||
(macroexp-progn
|
(macroexp-progn
|
||||||
(append (when disable
|
(append (when pin
|
||||||
(doom-log "Disabling package '%s'" name)
|
|
||||||
`((add-to-list 'doom-disabled-packages ',name nil 'eq)))
|
|
||||||
(when pin
|
|
||||||
(doom-log "Pinning package '%s' to '%s'" name pin)
|
(doom-log "Pinning package '%s' to '%s'" name pin)
|
||||||
`((setf (alist-get ',name package-pinned-packages) ,pin)))
|
`((setf (alist-get ',name package-pinned-packages) ,pin)))
|
||||||
`((setf (alist-get ',name doom-packages) ',plist)
|
`((setf (alist-get ',name doom-packages) ',plist))
|
||||||
(not (memq ',name doom-disabled-packages)))))))
|
(when disable
|
||||||
|
(doom-log "Disabling package '%s'" name)
|
||||||
|
`((add-to-list 'doom-disabled-packages ',name nil 'eq)
|
||||||
|
nil))))))
|
||||||
|
|
||||||
(defmacro packages! (&rest packages)
|
(defmacro packages! (&rest packages)
|
||||||
"A convenience macro for `package!' for declaring multiple packages at once.
|
"A convenience macro for `package!' for declaring multiple packages at once.
|
||||||
|
|
|
@ -94,7 +94,7 @@ combined.")
|
||||||
|
|
||||||
This file contains environment variables scraped from your shell environment,
|
This file contains environment variables scraped from your shell environment,
|
||||||
which is loaded at startup (if it exists). This is helpful if Emacs can't
|
which is loaded at startup (if it exists). This is helpful if Emacs can't
|
||||||
(easily) be launched from the correct shell session (particularly for MacOS
|
\(easily) be launched from the correct shell session (particularly for MacOS
|
||||||
users).")
|
users).")
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue