diff options
| author | Tino Calancha | 2016-02-23 16:24:52 +1100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-02-23 16:24:52 +1100 |
| commit | 1b0bf990b53a2626e2b825101615d72d78f98ef7 (patch) | |
| tree | 88bd1a463ea3fded55233d3df0c9101648426bb7 | |
| parent | 92da003692b894e6dc514e3a56a1861849dcad8c (diff) | |
| download | emacs-1b0bf990b53a2626e2b825101615d72d78f98ef7.tar.gz emacs-1b0bf990b53a2626e2b825101615d72d78f98ef7.zip | |
Keep the position in the process buffer when deleting processes
* lisp/simple.el (process-menu-delete-process): Keep the
position in the buffer after killing a process (bug#21759).
Copyright-paperwork-exempt: yes
| -rw-r--r-- | lisp/simple.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 4efad8ce9e3..8c9d546bb72 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3746,8 +3746,13 @@ support pty association, if PROGRAM is nil." | |||
| 3746 | (defun process-menu-delete-process () | 3746 | (defun process-menu-delete-process () |
| 3747 | "Kill process at point in a `list-processes' buffer." | 3747 | "Kill process at point in a `list-processes' buffer." |
| 3748 | (interactive) | 3748 | (interactive) |
| 3749 | (delete-process (tabulated-list-get-id)) | 3749 | (let ((pos (point))) |
| 3750 | (revert-buffer)) | 3750 | (delete-process (tabulated-list-get-id)) |
| 3751 | (revert-buffer) | ||
| 3752 | (goto-char (min pos (point-max))) | ||
| 3753 | (if (eobp) | ||
| 3754 | (forward-line -1) | ||
| 3755 | (beginning-of-line)))) | ||
| 3751 | 3756 | ||
| 3752 | (defun list-processes--refresh () | 3757 | (defun list-processes--refresh () |
| 3753 | "Recompute the list of processes for the Process List buffer. | 3758 | "Recompute the list of processes for the Process List buffer. |