mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Minor code tweak for delete-trailing-whitespace.
* lisp/simple.el (delete-trailing-whitespace): Avoid an unnecessary restriction change.
This commit is contained in:
parent
d39d3c8e5f
commit
a97dc38060
2 changed files with 4 additions and 1 deletions
|
|
@ -1,5 +1,8 @@
|
|||
2012-09-30 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* simple.el (delete-trailing-whitespace): Avoid an unnecessary
|
||||
restriction change.
|
||||
|
||||
* bindings.el (goto-map): Bind M-g TAB to move-to-column.
|
||||
|
||||
* help-fns.el (help-fns--obsolete): Fix last change.
|
||||
|
|
|
|||
|
|
@ -606,7 +606,7 @@ buffer if the variable `delete-trailing-lines' is non-nil."
|
|||
(when (and (not end)
|
||||
delete-trailing-lines
|
||||
;; Really the end of buffer.
|
||||
(save-restriction (widen) (eobp))
|
||||
(= (point-max) (1+ (buffer-size)))
|
||||
(<= (skip-chars-backward "\n") -2))
|
||||
(delete-region (1+ (point)) end-marker))
|
||||
(set-marker end-marker nil))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue