Fix incorrect load-file-name in autodef conditions

Causing errors where featurep! calls in ;;;###autodef cookie conditions
couldn't resolve the correct module from load-file-name.
This commit is contained in:
Henrik Lissner 2018-07-29 02:26:35 +02:00
parent 770463aff2
commit ea175180ef
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -469,7 +469,8 @@ even if it doesn't need reloading!"
"No documentation.")))
(push (cond ((not (and member-p
(or (null pred)
(eval (read pred) t))))
(let ((load-file-name path))
(eval (read pred) t)))))
(push doom-file-form forms)
(setq docstring (format "THIS FUNCTION DOES NOTHING BECAUSE %s IS DISABLED\n\n%s"
origin docstring))
@ -500,7 +501,8 @@ even if it doesn't need reloading!"
(target (doom-unquote target)))
(unless (and member-p
(or (null pred)
(eval (read pred) t)))
(let ((load-file-name path))
(eval (read pred) t))))
(setq target #'ignore))
(push doom-file-form forms)
(push `(put ',name 'doom-module ',origin) forms)