diff --git a/lisp/simple.el b/lisp/simple.el index 338a060..880ef67 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3560,8 +3560,11 @@ process-menu-mode (defun process-menu-delete-process () "Kill process at point in a `list-processes' buffer." (interactive) - (delete-process (tabulated-list-get-id)) - (revert-buffer)) + (let ((pos (point))) + (delete-process (tabulated-list-get-id)) + (revert-buffer) + (goto-char pos) + (if (= (point) (point-max)) (forward-line -1) (goto-char (line-beginning-position))))) (defun list-processes--refresh () "Recompute the list of processes for the Process List buffer.