Minor code tweak for delete-trailing-whitespace.

* lisp/simple.el (delete-trailing-whitespace): Avoid an unnecessary
restriction change.
This commit is contained in:
Chong Yidong 2012-09-30 16:41:37 +08:00
parent d39d3c8e5f
commit a97dc38060
2 changed files with 4 additions and 1 deletions

View file

@ -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.

View file

@ -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))))