diff --git a/core/prelude-core.el b/core/prelude-core.el index 28615c2..7ce5060 100644 --- a/core/prelude-core.el +++ b/core/prelude-core.el @@ -297,12 +297,9 @@ there's a region, all lines that region covers will be duplicated." (defun prelude-eval-and-replace () "Replace the preceding sexp with its value." (interactive) - (backward-kill-sexp) - (condition-case nil - (prin1 (eval (read (current-kill 0))) - (current-buffer)) - (error (message "Invalid expression") - (insert (current-kill 0))))) + (let ((value (eval (preceding-sexp)))) + (backward-kill-sexp) + (insert (format "%s" value)))) (defun prelude-recompile-init () "Byte-compile all your dotfiles again."