1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-03 08:30:09 +00:00

* whitespace.el (whitespace-cleanup): Fix whitespace-empty-at-bob-regexp usage.

Fixes: debbugs:11492
This commit is contained in:
Chong Yidong 2012-05-29 19:51:19 +08:00
parent 2b311310c3
commit a149fa519d
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2012-05-29 Chong Yidong <cyd@gnu.org>
* whitespace.el (whitespace-cleanup): Fix usage of
whitespace-empty-at-bob-regexp (Bug#11492).
2012-05-29 Aaron S. Hawley <aaron.s.hawley@gmail.com>
* vc/vc.el (vc-revert, vc-rollback): Dont kill vc-diff buffer on

View File

@ -1533,8 +1533,7 @@ documentation."
(when (memq 'empty whitespace-style)
(let (overwrite-mode) ; enforce no overwrite
(goto-char (point-min))
(when (re-search-forward
(concat "\\`" whitespace-empty-at-bob-regexp) nil t)
(when (looking-at whitespace-empty-at-bob-regexp)
(delete-region (match-beginning 1) (match-end 1)))
(when (re-search-forward
(concat whitespace-empty-at-eob-regexp "\\'") nil t)