From: Stefan Monnier Date: Wed, 28 Sep 2011 20:50:16 +0000 (-0400) Subject: * simple.el (delete-trailing-whitespace): Fix last change. X-Git-Tag: emacs-pretest-24.0.91~253 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=88d9610cae8004cf9856be84d76c389e7fc3b14b;p=emacs.git * simple.el (delete-trailing-whitespace): Fix last change. --- 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'.