aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2000-12-03 02:29:36 +0000
committerMiles Bader2000-12-03 02:29:36 +0000
commit5c9b3fac0e880bc48085d47452f3770b220eb82f (patch)
tree873d9b1bb27c2fff84103e5ea4c3e85ebcc11508
parent07c16ec439c7285e32152ba557c8f7a60fe410cf (diff)
downloademacs-5c9b3fac0e880bc48085d47452f3770b220eb82f.tar.gz
emacs-5c9b3fac0e880bc48085d47452f3770b220eb82f.zip
(delete-trailing-whitespace): Don't delete newlines too.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/simple.el6
2 files changed, 8 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 751867d50eb..a8cbc78b0bc 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12000-12-03 Miles Bader <miles@gnu.org>
2
3 * simple.el (delete-trailing-whitespace): Don't delete newlines too.
4
12000-12-02 Stefan Monnier <monnier@cs.yale.edu> 52000-12-02 Stefan Monnier <monnier@cs.yale.edu>
2 6
3 * textmodes/tex-mode.el (tex-start-shell): Obey shell-file-name. 7 * textmodes/tex-mode.el (tex-start-shell): Obey shell-file-name.
diff --git a/lisp/simple.el b/lisp/simple.el
index f05abdcf276..2158d35891c 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -232,9 +232,11 @@ This respects narrowing, created by \\[narrow-to-region] and friends."
232 (interactive "*") 232 (interactive "*")
233 (save-match-data 233 (save-match-data
234 (save-excursion 234 (save-excursion
235 (let (eol bol)
235 (goto-char (point-min)) 236 (goto-char (point-min))
236 (while (re-search-forward "\\s-+$" nil t) 237 (while (re-search-forward "\\s-$" nil t)
237 (delete-region (match-beginning 0) (match-end 0)))))) 238 (skip-syntax-backward "-" (save-excursion (forward-line 0) (point)))
239 (delete-region (point) (match-end 0)))))))
238 240
239(defun newline-and-indent () 241(defun newline-and-indent ()
240 "Insert a newline, then indent according to major mode. 242 "Insert a newline, then indent according to major mode.