GNU bug report logs -
#11492
whitespace.el (whitespace-cleanup) not cleaning beginning-of-buffer [PATCH]
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 <dev <at> kjfletch.co.uk>
* lisp/whitespace.el (whitespace-cleanup): Fixed cleaning of
whitespace at beginning of buffer.
[whitespace-bob.diff (text/x-diff, inline)]
=== 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)
This bug report was last modified 12 years and 364 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.