spacemacs/layers/+tools/shell/funcs.el

31 lines
1 KiB
EmacsLisp
Raw Normal View History

;;; funcs.el --- Spacemacs Base Layer functions File
;;
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defun spacemacs/projectile-shell-pop ()
"Open a term buffer at projectile project root."
(interactive)
(let ((default-directory (projectile-project-root)))
(call-interactively 'spacemacs/default-pop-shell)))
(defun spacemacs/disable-hl-line-mode ()
"Locally disable global-hl-line-mode"
(interactive)
(setq-local global-hl-line-mode nil))
(defun spacemacs/init-eshell-xterm-color ()
"Initialize xterm coloring for eshell"
(setq-local xterm-color-preserve-properties t)
(make-local-variable 'eshell-preoutput-filter-functions)
(add-hook 'eshell-preoutput-filter-functions 'xterm-color-filter)
(setq-local eshell-output-filter-functions
(remove 'eshell-handle-ansi-color
eshell-output-filter-functions)))