summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/simple.el11
2 files changed, 16 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ecb2a8e33a0..613108fc015 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-26 Daniel Colascione <dancol@dancol.org>
+
+ * simple.el (process-menu-mode-map): New variable.
+ (process-menu-delete-process): New command.
+
2014-03-26 Juanma Barranquero <lekktu@gmail.com>
* emacs-lisp/package.el: Fix bug#16733 (again).
diff --git a/lisp/simple.el b/lisp/simple.el
index 96ac5efd5cc..2ee62310b98 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3269,6 +3269,11 @@ support pty association, if PROGRAM is nil."
(defvar process-menu-query-only nil)
+(defvar process-menu-mode-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map [?d] 'process-menu-delete-process)
+ map))
+
(define-derived-mode process-menu-mode tabulated-list-mode "Process Menu"
"Major mode for listing the processes called by Emacs."
(setq tabulated-list-format [("Process" 15 t)
@@ -3281,6 +3286,12 @@ support pty association, if PROGRAM is nil."
(add-hook 'tabulated-list-revert-hook 'list-processes--refresh nil t)
(tabulated-list-init-header))
+(defun process-menu-delete-process ()
+ "Kill process at point in a `list-processes' buffer."
+ (interactive)
+ (delete-process (tabulated-list-get-id))
+ (revert-buffer))
+
(defun list-processes--refresh ()
"Recompute the list of processes for the Process List buffer.
Also, delete any process that is exited or signaled."