summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/whitespace.el3
2 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 03acd7edafa..2e4155e6c0d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index e752dc56553..a529725fc38 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -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)