blob: ae4d1d16671f2b7bd394fa0165e6cd45806317ac (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
;;; terminal-here.el --- Run an external terminal in current directory -*- lexical-binding: t; -*-
;; Copyright (C) 2015 Free Software Foundation, Inc.
;; Author: David Shepherd <davidshepherd7@gmail.com>
;; Version: 0.1
;; Package-Requires: (TODO)
;; Keywords: TODO
;; URL: https://github.com/davidshepherd7/terminal-here
;;; Commentary:
;; TODO
;;; Code:
(defcustom terminal-here-terminal-command
"x-terminal-emulator"
"Terminal binary, or list of (binary arg1 arg2 ...)"
:group 'terminal-here
:type '(list string))
(defun terminal-here-cwd ()
"Launch a terminal in the working directory of the current buffer"
(interactive)
(let ((terminal-command (if (listp terminal-here-terminal-command) (car terminal-here-terminal-command) terminal-here-terminal-command))
(terminal-arguments (if (listp terminal-here-terminal-command) (cdr terminal-here-terminal-command) '())))
(apply #'start-process
terminal-command nil terminal-command
terminal-arguments)))
(provide 'terminal-here)
;;; terminal-here.el ends here
|