[Emacs] Add eros package
This commit is contained in:
parent
3110b14ca7
commit
9691440730
@ -2412,34 +2412,13 @@ Reduce indentation for some functions
|
|||||||
(setq show-trailing-whitespace t)))
|
(setq show-trailing-whitespace t)))
|
||||||
(add-hook 'flycheck-mode-hook 'imalison:maybe-remove-flycheck-checkdoc-checker)
|
(add-hook 'flycheck-mode-hook 'imalison:maybe-remove-flycheck-checkdoc-checker)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
**** Show result of eval-last-sexp inline
|
**** eros
|
||||||
Taken from http://endlessparentheses.com/eval-result-overlays-in-emacs-lisp.html
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(autoload 'cider--make-result-overlay "cider-overlays")
|
(use-package eros
|
||||||
|
:commands (eros-mode)
|
||||||
(defun imalison:eval-overlay (value point)
|
:preface
|
||||||
(cider--make-result-overlay (format "%S" value)
|
(progn
|
||||||
:where point
|
(add-hook 'emacs-lisp-mode-hook 'eros-mode)))
|
||||||
:duration 'command)
|
|
||||||
value)
|
|
||||||
|
|
||||||
(advice-add 'eval-region :around
|
|
||||||
(lambda (f beg end &rest r)
|
|
||||||
(imalison:eval-overlay
|
|
||||||
(apply f beg end r)
|
|
||||||
end)))
|
|
||||||
|
|
||||||
(advice-add 'eval-last-sexp :filter-return
|
|
||||||
(lambda (r)
|
|
||||||
(imalison:eval-overlay r (point))))
|
|
||||||
|
|
||||||
(advice-add 'eval-defun :filter-return
|
|
||||||
(lambda (r)
|
|
||||||
(imalison:eval-overlay
|
|
||||||
r
|
|
||||||
(save-excursion
|
|
||||||
(end-of-defun)
|
|
||||||
(point)))))
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
**** Reevalute defvars when running eval-last-sexp
|
**** Reevalute defvars when running eval-last-sexp
|
||||||
We noflet elisp--preceding-sexp to munge defvars into sexps only for
|
We noflet elisp--preceding-sexp to munge defvars into sexps only for
|
||||||
@ -3299,7 +3278,7 @@ alphanumeric characters only."
|
|||||||
#+END_SRC
|
#+END_SRC
|
||||||
**** org-projectile
|
**** org-projectile
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(imalison:use-package org-projectile
|
(use-package org-projectile
|
||||||
:after helm
|
:after helm
|
||||||
:bind (("C-c n p" . imalison:helm-org-todo))
|
:bind (("C-c n p" . imalison:helm-org-todo))
|
||||||
:config
|
:config
|
||||||
|
Loading…
Reference in New Issue
Block a user