fix(emacs-lisp): set doom-module-context in eval handler
So module context is in scope of evaluated code.
Amend: 4efaf6837b
This commit is contained in:
parent
5222612527
commit
156fade7e2
1 changed files with 4 additions and 1 deletions
|
@ -13,7 +13,10 @@ to a pop up buffer."
|
||||||
(debug-on-error t))
|
(debug-on-error t))
|
||||||
(unwind-protect
|
(unwind-protect
|
||||||
(condition-case-unless-debug e
|
(condition-case-unless-debug e
|
||||||
(let ((doom--current-module (ignore-errors (doom-module-from-path buffer-file-name))))
|
(doom-module-context-with
|
||||||
|
(doom-module-from-path
|
||||||
|
(or (buffer-file-name (buffer-base-buffer))
|
||||||
|
default-directory))
|
||||||
(doom-context-with 'eval
|
(doom-context-with 'eval
|
||||||
(eval-region beg end buffer load-read-function))
|
(eval-region beg end buffer load-read-function))
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue