From 88d9610cae8004cf9856be84d76c389e7fc3b14b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 28 Sep 2011 16:50:16 -0400 Subject: [PATCH] * simple.el (delete-trailing-whitespace): Fix last change. --- lisp/ChangeLog | 2 ++ lisp/simple.el | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f83dbdd344a..0927ff478c2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2011-09-28 Stefan Monnier + * simple.el (delete-trailing-whitespace): Fix last change. + * progmodes/perl-mode.el (perl-syntax-propertize-function): Don't confuse "y => 3" as the beginning of a `y' operation. diff --git a/lisp/simple.el b/lisp/simple.el index 142270930ca..14ce5ed18ec 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -589,9 +589,9 @@ If the region is active, only delete whitespace within the region." ;; Delete trailing empty lines. (goto-char end-marker) (when (and (not end) - (<= (skip-chars-backward "\n") -2) ;; Really the end of buffer. - (save-restriction (widen) (eobp))) + (save-restriction (widen) (eobp)) + (<= (skip-chars-backward "\n") -2)) (delete-region (1+ (point)) end-marker)) (set-marker end-marker nil)))) ;; Return nil for the benefit of `write-file-functions'. -- 2.39.2