mirror of
https://codeberg.org/scip/dot-emacs.git
synced 2025-12-17 04:20:57 +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-window-dedicated-p (selected-window) t)
|
||||||
(set-background-color "azure"))))
|
(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)
|
(provide 'init-elisp)
|
||||||
;;; init-elisp.el ends here
|
;;; init-elisp.el ends here
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
:init
|
:init
|
||||||
;; I'm not using any of th lsp commands, but better define a prefix
|
;; I'm not using any of th lsp commands, but better define a prefix
|
||||||
;; than being unable to reach it
|
;; than being unable to reach it
|
||||||
|
;; FIXME: add at least lsp-find-definition
|
||||||
(setq lsp-keymap-prefix "C-c C-l")
|
(setq lsp-keymap-prefix "C-c C-l")
|
||||||
|
|
||||||
:commands lsp)
|
:commands lsp)
|
||||||
|
|||||||
Reference in New Issue
Block a user