From 66dd405041e132f8ccdcf89ef0946a09af0c52fc Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 30 Dec 2016 12:50:24 -0800 Subject: [PATCH 1/2] [Emacs] Don't add eros advice until eros is loaded --- dotfiles/emacs.d/README.org | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index ab6c82d0..bc131362 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -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 From 7babc8284685aa34104a39066345d19a3925d223 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 30 Dec 2016 12:51:01 -0800 Subject: [PATCH 2/2] [Emacs] Require highlight-indent-guides before tweaking its faces --- dotfiles/emacs.d/README.org | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index bc131362..e4586c9b 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -1672,7 +1672,9 @@ https://github.com/alpaker/Fill-Column-Indicator/issues/21 for more details ;; the time of load-theme (defun imalison:set-highlight-indent-guides-faces-load-theme (&rest args) (if (face-background 'default) - (imalison:set-highlight-indent-guides-faces) + (progn + (require 'highlight-indent-guides) + (imalison:set-highlight-indent-guides-faces)) (run-at-time "1 sec" nil 'imalison:set-highlight-indent-guides-faces-load-theme))) (advice-add 'load-theme