From db3a1ebed2256a2d615bdb4ddd28f29335621d0c Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sat, 28 Feb 2015 01:23:51 +0900 Subject: [PATCH] emacs.el: Remove my-term-shell-command: now term-run package this feature --- emacs.el | 54 ------------------------------------------------------ 1 file changed, 54 deletions(-) diff --git a/emacs.el b/emacs.el index d10e267..e80b698 100644 --- a/emacs.el +++ b/emacs.el @@ -2358,60 +2358,6 @@ If ARG is given or called with prefix argument, create new buffer." "--cached" file)))) -(defvar term-shell-command-history nil - "History for term-shell-command.") -(defun my-term-shell-command (command &optional new-buffer-p) - "Run COMMAND in terminal emulator. -If NEW-BUFFER-P is given or called with prefix argument, generate new buffer -and set the buffer the process buffer. Otherwise, existing buffer will be used." - (interactive (list (read-shell-command "Shell Command: " - nil - 'term-shell-command-history) - current-prefix-arg)) - (let* ((name (car (split-string command - " "))) - (buf (if new-buffer-p - (generate-new-buffer "*term shell command*") - (get-buffer-create "*term shell command*"))) - (proc (get-buffer-process buf)) - (dir default-directory)) - (and proc - (delete-process proc)) - (display-buffer buf) - (with-current-buffer buf - (cd dir) - (set (make-local-variable 'term-scroll-to-bottom-on-output) - t) - (let ((inhibit-read-only t)) - (goto-char (point-max)) - (insert "\n") - (insert "Start executing " - command) - (add-text-properties (point-at-bol) - (point-at-eol) - '(face bold)) - (insert "\n\n")) - (require 'term) - (term-mode) - (term-exec buf - (concat "term-" name) - shell-file-name - nil - (list shell-command-switch - command)) - (term-char-mode) - (if (ignore-errors (get-buffer-process buf)) - (set-process-sentinel (get-buffer-process buf) - (lambda (proc change) - (with-current-buffer (process-buffer proc) - (term-sentinel proc change) - (goto-char (point-max)) - (fundamental-mode)))) - (fundamental-mode) - (goto-char (point-max)) - )))) -(define-key ctl-x-map ":" 'my-term-shell-command) - (defun memo (&optional dir) "Open memo.txt in DIR." (interactive)