mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-28 01:00:52 -07:00
* lisp/simple.el (delete-trailing-whitespace): Also delete
extra newlines at the end of the buffer.
This commit is contained in:
parent
eca3f3ea3a
commit
d68e189a96
2 changed files with 9 additions and 0 deletions
|
|
@ -1,5 +1,8 @@
|
|||
2011-09-23 Peter J. Weisberg <pj@irregularexpressions.net>
|
||||
|
||||
* simple.el (delete-trailing-whitespace): Also delete
|
||||
extra newlines at the end of the buffer.
|
||||
|
||||
* textmodes/picture.el: Make motion commands obey shift-select-mode.
|
||||
(picture-newline): Use forward-line so as to ignore fields.
|
||||
|
||||
|
|
|
|||
|
|
@ -586,6 +586,12 @@ If the region is active, only delete whitespace within the region."
|
|||
(if (looking-at ".*\f")
|
||||
(goto-char (match-end 0))))
|
||||
(delete-region (point) (match-end 0)))
|
||||
(save-restriction
|
||||
(goto-char end-marker)
|
||||
(widen)
|
||||
(if (and (eobp)
|
||||
(looking-back "\n\n+" nil t))
|
||||
(replace-match "\n")))
|
||||
(set-marker end-marker nil))))
|
||||
;; Return nil for the benefit of `write-file-functions'.
|
||||
nil)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue