Merge pull request #737 from dougm/term-buffer-name

Add prelude-term-buffer-name variable
This commit is contained in:
Bozhidar Batsov 2014-11-23 21:02:25 +02:00
commit cba761c212

View file

@ -59,12 +59,16 @@ With a prefix ARG always prompt for command to use."
(with-current-buffer buffer-or-name (with-current-buffer buffer-or-name
major-mode)) 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 () (defun prelude-visit-term-buffer ()
"Create or visit a terminal buffer." "Create or visit a terminal buffer."
(interactive) (interactive)
(prelude-start-or-switch-to (lambda () (prelude-start-or-switch-to (lambda ()
(ansi-term (getenv "SHELL"))) (ansi-term (getenv "SHELL") (concat prelude-term-buffer-name "-term")))
"*ansi-term*")) (format "*%s-term*" prelude-term-buffer-name)))
(defun prelude-search (query-url prompt) (defun prelude-search (query-url prompt)
"Open the search url constructed with the QUERY-URL. "Open the search url constructed with the QUERY-URL.