From 3a768251332e3388b319c2092f5b28de7907e07e Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 29 Jan 2001 20:36:26 +0000 Subject: [PATCH] (delete-trailing-whitespace): Don't delete formfeeds. --- lisp/ChangeLog | 4 ++++ lisp/simple.el | 3 +++ 2 files changed, 7 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c90a1f02d9e..f8dcaf67ee2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2001-01-29 Gerd Moellmann + + * simple.el (delete-trailing-whitespace): Don't delete formfeeds. + 2001-01-29 Stefan Monnier * pcvs.el (cvs-mark-fis-dead): New function. diff --git a/lisp/simple.el b/lisp/simple.el index f81b05f13b1..092dfad5f16 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -237,6 +237,9 @@ This respects narrowing, created by \\[narrow-to-region] and friends." (goto-char (point-min)) (while (re-search-forward "\\s-$" nil t) (skip-syntax-backward "-" (save-excursion (forward-line 0) (point))) + ;; Don't delete formfeeds, even if they are considered whitespace. + (if (looking-at ".*\f") + (goto-char (match-end 0))) (delete-region (point) (match-end 0)))))) (defun newline-and-indent () -- 2.39.2