summaryrefslogtreecommitdiff
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-01-29 20:36:26 +0000
committerGerd Moellmann <gerd@gnu.org>2001-01-29 20:36:26 +0000
commit3a768251332e3388b319c2092f5b28de7907e07e (patch)
tree181edcdf3eb9c2e70c3e25fb65a34d3dcf8ef3fc /lisp/simple.el
parent274d02f77c422ce72defcb86044b4a9f5be59cab (diff)
downloademacs-3a768251332e3388b319c2092f5b28de7907e07e.tar.gz
(delete-trailing-whitespace): Don't delete formfeeds.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el3
1 files changed, 3 insertions, 0 deletions
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 ()