From 604c24bf0e9cf365401a3126a8bb8d1487c40c59 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Sat, 29 Apr 2017 15:50:15 -0700 Subject: [PATCH] Replace define-advice with advice-add in the shell layer `define-advice` requires Emacs 25. Addresses: https://github.com/syl20bnr/spacemacs/pull/8635#issuecomment-297887734 --- layers/+tools/shell/packages.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/layers/+tools/shell/packages.el b/layers/+tools/shell/packages.el index 26612e274..4ae9b5d9f 100644 --- a/layers/+tools/shell/packages.el +++ b/layers/+tools/shell/packages.el @@ -89,12 +89,16 @@ ;; buffer. This breaks the xterm color filtering when the eshell buffer is updated ;; when it's not currently focused. ;; To remove if/when fixed upstream. - (define-advice eshell-output-filter (:around (fn process string) with-buffer) + (defun eshell-output-filter@spacemacs-with-buffer (fn process string) (let ((proc-buf (if process (process-buffer process) (current-buffer)))) (when proc-buf (with-current-buffer proc-buf (funcall fn process string))))) + (advice-add + #'eshell-output-filter + :around + #'eshell-output-filter@spacemacs-with-buffer) (require 'esh-opt)