(delete-trailing-whitespace): Don't delete newlines too.
This commit is contained in:
parent
07c16ec439
commit
5c9b3fac0e
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
2000-12-03 Miles Bader <miles@gnu.org>
|
||||
|
||||
* simple.el (delete-trailing-whitespace): Don't delete newlines too.
|
||||
|
||||
2000-12-02 Stefan Monnier <monnier@cs.yale.edu>
|
||||
|
||||
* textmodes/tex-mode.el (tex-start-shell): Obey shell-file-name.
|
||||
|
|
|
@ -232,9 +232,11 @@ This respects narrowing, created by \\[narrow-to-region] and friends."
|
|||
(interactive "*")
|
||||
(save-match-data
|
||||
(save-excursion
|
||||
(let (eol bol)
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "\\s-+$" nil t)
|
||||
(delete-region (match-beginning 0) (match-end 0))))))
|
||||
(while (re-search-forward "\\s-$" nil t)
|
||||
(skip-syntax-backward "-" (save-excursion (forward-line 0) (point)))
|
||||
(delete-region (point) (match-end 0)))))))
|
||||
|
||||
(defun newline-and-indent ()
|
||||
"Insert a newline, then indent according to major mode.
|
||||
|
|
Loading…
Add table
Reference in a new issue