diff options
| author | Chong Yidong | 2012-09-30 16:41:37 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-09-30 16:41:37 +0800 |
| commit | a97dc380601446c00adfbd1d8e86e73e7d81a359 (patch) | |
| tree | f999a6f311e0f0253d1d539846f6015634f47e6c | |
| parent | d39d3c8e5f4738a405aa2b36ed7895e92dfa5a4b (diff) | |
| download | emacs-a97dc380601446c00adfbd1d8e86e73e7d81a359.tar.gz emacs-a97dc380601446c00adfbd1d8e86e73e7d81a359.zip | |
Minor code tweak for delete-trailing-whitespace.
* lisp/simple.el (delete-trailing-whitespace): Avoid an unnecessary
restriction change.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/simple.el | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f9a81c2b7cb..65ff71c74f8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2012-09-30 Chong Yidong <cyd@gnu.org> | 1 | 2012-09-30 Chong Yidong <cyd@gnu.org> |
| 2 | 2 | ||
| 3 | * simple.el (delete-trailing-whitespace): Avoid an unnecessary | ||
| 4 | restriction change. | ||
| 5 | |||
| 3 | * bindings.el (goto-map): Bind M-g TAB to move-to-column. | 6 | * bindings.el (goto-map): Bind M-g TAB to move-to-column. |
| 4 | 7 | ||
| 5 | * help-fns.el (help-fns--obsolete): Fix last change. | 8 | * help-fns.el (help-fns--obsolete): Fix last change. |
diff --git a/lisp/simple.el b/lisp/simple.el index 417dedb43db..616a4d7b1ea 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -606,7 +606,7 @@ buffer if the variable `delete-trailing-lines' is non-nil." | |||
| 606 | (when (and (not end) | 606 | (when (and (not end) |
| 607 | delete-trailing-lines | 607 | delete-trailing-lines |
| 608 | ;; Really the end of buffer. | 608 | ;; Really the end of buffer. |
| 609 | (save-restriction (widen) (eobp)) | 609 | (= (point-max) (1+ (buffer-size))) |
| 610 | (<= (skip-chars-backward "\n") -2)) | 610 | (<= (skip-chars-backward "\n") -2)) |
| 611 | (delete-region (1+ (point)) end-marker)) | 611 | (delete-region (1+ (point)) end-marker)) |
| 612 | (set-marker end-marker nil)))) | 612 | (set-marker end-marker nil)))) |