[Emacs] Don't add eros advice until eros is loaded
This commit is contained in:
parent
fd57bc0a61
commit
66dd405041
@ -2504,6 +2504,10 @@ Reduce indentation for some functions
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package eros
|
||||
:commands (eros-mode)
|
||||
:config
|
||||
(progn
|
||||
(advice-add 'eval-defun :around 'eros-around-eval-defun)
|
||||
(advice-add 'eval-last-sexp :around 'eros-around-eval-last-sexp))
|
||||
:preface
|
||||
(progn
|
||||
(defun eros-around-eval-last-sexp (fn &rest args)
|
||||
@ -2516,9 +2520,6 @@ Reduce indentation for some functions
|
||||
(end-of-defun)
|
||||
(point))))
|
||||
|
||||
(advice-add 'eval-defun :around 'eros-around-eval-defun)
|
||||
(advice-add 'eval-last-sexp :around 'eros-around-eval-last-sexp)
|
||||
|
||||
(add-hook 'emacs-lisp-mode-hook 'eros-mode)))
|
||||
#+END_SRC
|
||||
**** Reevalute defvars when running eval-last-sexp
|
||||
|
Loading…
Reference in New Issue
Block a user