diff options
Diffstat (limited to 'lisp/simple.el')
-rw-r--r-- | lisp/simple.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 0b04b80cb67..8c9d546bb72 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1170,7 +1170,7 @@ END, without printing any message." (save-restriction (narrow-to-region start end) (goto-char (point-min)) - (while (forward-word-strictly 1) + (while (forward-word 1) (setq words (1+ words))))) words)) ((use-region-p) @@ -3746,8 +3746,13 @@ support pty association, if PROGRAM is nil." (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 (min pos (point-max))) + (if (eobp) + (forward-line -1) + (beginning-of-line)))) (defun list-processes--refresh () "Recompute the list of processes for the Process List buffer. |