Subject: whitespace.el (whitespace-cleanup) not cleaning beginning-of-buffer [PATCH]

From: Kevin J. Fletcher <[email-masked]>
Date: Wed, 16 May 2012 22:19:38 +0100

whitespace.el: (whitespace-cleanup) fails to clean whitespace at
beginning of buffer due to a failed regexp starting with "\\`^".

This patch removes the "^" from the regexp.

2012-05-16  Kevin Fletcher <[email-masked]>
	* lisp/whitespace.el (whitespace-cleanup): Fixed cleaning of
	whitespace at beginning of buffer.

=== modified file 'lisp/whitespace.el'
*** lisp/whitespace.el	2012-01-19 07:21:25 +0000
--- lisp/whitespace.el	2012-05-16 20:56:53 +0000
*************** documentation."
*** 1534,1540 ****
  	  (let (overwrite-mode)		; enforce no overwrite
  	    (goto-char (point-min))
  	    (when (re-search-forward
! 		   (concat "\\`" whitespace-empty-at-bob-regexp) nil t)
  	      (delete-region (match-beginning 1) (match-end 1)))
  	    (when (re-search-forward
  		   (concat whitespace-empty-at-eob-regexp "\\'") nil t)
--- 1534,1543 ----
  	  (let (overwrite-mode)		; enforce no overwrite
  	    (goto-char (point-min))
  	    (when (re-search-forward
! 		   (concat "\\`"
! 			   (replace-regexp-in-string
! 			    "^\\^"  "" whitespace-empty-at-bob-regexp))
! 		   nil t)
  	      (delete-region (match-beginning 1) (match-end 1)))
  	    (when (re-search-forward
  		   (concat whitespace-empty-at-eob-regexp "\\'") nil t)