[Mailman-Developers] Scrubber.py confusion, 2.1b3
Barry A. Warsaw
Tue, 20 Aug 2002 14:59:34 -0400
>>>>> "DN" == Dale Newfield <Dale@Newfield.org> writes:
DN> Noticed that. Great catch--thanks for the quick fix. Let me
DN> reiterate my earlier plea (for others to hear, since you've
DN> already followed it :-) for the entire codebase:
DN> "Spaces! No tabs, please!"
For (X)Emacs heads, here's the little bit of elisp I use to clean
files up -- when I think about it.
;; untabify and clean up lines with just whitespace
(defun baw-whitespace-normalization (start end)
"Like untabify, but also cleans up lines with trailing whitespace."
(untabify start end)
(narrow-to-region (point-min) end)
(while (re-search-forward "\\s +$" nil t)
(let ((bol (save-excursion (beginning-of-line) (point)))
(eol (save-excursion (end-of-line) (point))))
(goto-char (match-beginning 0))
(if (and (bolp)
(eq (char-after) ?\))
(skip-chars-backward " \t" bol)
(delete-region (point) eol)