From a77540e77425cf51cc63de48eb12b27f4dea71e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Johan=20Bockg=C3=A5rd?= Date: Sun, 12 Apr 2015 15:50:02 +0200 Subject: [PATCH] * lisp/rect.el (delete-whitespace-rectangle-line): Don't cross EOL. --- lisp/rect.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/rect.el b/lisp/rect.el index 75585d2f080..acd3a48f2da 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -346,7 +346,8 @@ no text on the right side of the rectangle." (defun delete-whitespace-rectangle-line (startcol _endcol fill) (when (= (move-to-column startcol (if fill t 'coerce)) startcol) (unless (= (point) (point-at-eol)) - (delete-region (point) (progn (skip-syntax-forward " ") (point)))))) + (delete-region (point) (progn (skip-syntax-forward " " (point-at-eol)) + (point)))))) ;;;###autoload (defalias 'close-rectangle 'delete-whitespace-rectangle) ;; Old name -- 2.39.2