From 4517a2f594d44ce27fb57a7903643dc56f8fdfa9 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Thu, 6 Nov 2014 07:12:23 -0800 Subject: [PATCH] Add prelude-term-buffer-name variable This provides multi-term support via .dir-locals.el for example. --- core/prelude-core.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/prelude-core.el b/core/prelude-core.el index 28eb93d03a..f0fb06d4d8 100644 --- a/core/prelude-core.el +++ b/core/prelude-core.el @@ -59,12 +59,16 @@ With a prefix ARG always prompt for command to use." (with-current-buffer buffer-or-name major-mode)) +(defvar prelude-term-buffer-name "ansi" + "The default `ansi-term' name used by `prelude-visit-term-buffer'. +This variable can be set via .dir-locals.el to provide multi-term support.") + (defun prelude-visit-term-buffer () "Create or visit a terminal buffer." (interactive) (prelude-start-or-switch-to (lambda () - (ansi-term (getenv "SHELL"))) - "*ansi-term*")) + (ansi-term (getenv "SHELL") (concat prelude-term-buffer-name "-term"))) + (format "*%s-term*" prelude-term-buffer-name))) (defun prelude-search (query-url prompt) "Open the search url constructed with the QUERY-URL.