--- simple.el.orig 2009-06-09 17:42:26.000000000 +0300 +++ simple.el 2009-06-09 17:54:16.000000000 +0300 @@ -4488,15 +4488,18 @@ (signal 'end-of-buffer nil)) (setq end (save-excursion (end-of-visual-line) (point))) - (if (or (save-excursion - ;; If trailing whitespace is visible, - ;; don't treat it as nothing. - (unless show-trailing-whitespace - (skip-chars-forward " \t" end)) - (= (point) end)) - (and kill-whole-line (bolp))) - (line-move 1) - (goto-char end))) + (cond ((eolp) + (goto-char (1+ (point)))) + ((or (save-excursion + ;; If trailing whitespace is visible, + ;; don't treat it as nothing. + (unless show-trailing-whitespace + (skip-chars-forward " \t" end)) + (= (point) end)) + (and kill-whole-line (bolp))) + (line-move 1)) + (t + (goto-char end)))) (kill-region opoint (point)))) (defun next-logical-line (&optional arg try-vscroll)