diff --git a/layers/+distribution/spacemacs/packages.el b/layers/+distribution/spacemacs/packages.el index 11c8e74e2..16e16a34a 100644 --- a/layers/+distribution/spacemacs/packages.el +++ b/layers/+distribution/spacemacs/packages.el @@ -1726,12 +1726,10 @@ Open junk file using helm, with `prefix-arg' search in junk files" :config (progn (setq scroll-margin 5) - ;; add hooks here only for emacs built-in packages + ;; add hooks here only for emacs built-in packages that are not owned + ;; by a layer. (spacemacs/add-to-hooks 'spacemacs//unset-scroll-margin - '(messages-buffer-mode-hook - eshell-mode-hook - comint-mode-hook - term-mode-hook)))) + '(messages-buffer-mode-hook)))) (unless dotspacemacs-smooth-scrolling ;; deactivate smooth-scrolling advices diff --git a/layers/shell/packages.el b/layers/shell/packages.el index 74df05bce..a2703084c 100644 --- a/layers/shell/packages.el +++ b/layers/shell/packages.el @@ -19,6 +19,7 @@ xterm-color shell shell-pop + smooth-scrolling term eshell eshell-z @@ -321,6 +322,12 @@ is achieved by adding the relevant text properties." "ast" 'shell-pop-ansi-term "asT" 'shell-pop-term)))) +(defun shell/post-init-smooth-scrolling () + (spacemacs/add-to-hooks 'spacemacs//unset-scroll-margin + '(eshell-mode-hook + comint-mode-hook + term-mode-hook))) + (defun shell/init-term () (defun term-send-tab () "Send tab in term mode."