Return to Snippet

Revision: 17059
at August 21, 2009 14:58 by bigfaceworm


Initial Code
(defun strip-trailing-whitespace ()
  "remove all whitespace from the end of lines in the entire buffer"
  (interactive)
  (save-excursion
    (goto-char (point-min))
    (while (re-search-forward "\\s-+$" nil t)
      (replace-match ""))))

Initial URL
http://stackoverflow.com/questions/41522/tips-for-learning-elisp/59589#59589

Initial Description
A solution to the 'strip-trailing-whitespace example found: http://stackoverflow.com/questions/41522/tips-for-learning-elisp/59589#59589

Initial Title
strip-trailing-whitespace

Initial Tags

                                

Initial Language
Emacs Lisp