mirror of
https://codeberg.org/scip/dot-emacs.git
synced 2025-12-16 20:10:58 +01:00
+eval-and-replcae from crux
This commit is contained in:
@@ -189,7 +189,17 @@ Returns t if version changed, nil otherwise."
|
||||
(set-window-dedicated-p (selected-window) t)
|
||||
(set-background-color "azure"))))
|
||||
|
||||
|
||||
;; from prelude and crux, comes in handy when I need to do an ad hoc
|
||||
;; calc
|
||||
(defun 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)))))
|
||||
|
||||
(provide 'init-elisp)
|
||||
;;; init-elisp.el ends here
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
:init
|
||||
;; I'm not using any of th lsp commands, but better define a prefix
|
||||
;; than being unable to reach it
|
||||
;; FIXME: add at least lsp-find-definition
|
||||
(setq lsp-keymap-prefix "C-c C-l")
|
||||
|
||||
:commands lsp)
|
||||
|
||||
Reference in New Issue
Block a user