The empty line(s) can be commented out or have whitespace

This commit is contained in:
Dmitry Gutov 2012-11-29 09:36:12 +04:00
parent b66ca67da6
commit bcd3ee7a02

View file

@ -447,9 +447,12 @@ The file is written to `package-build-working-dir'."
;; Adapted from `describe-package-1'.
(goto-char (point-min))
(save-excursion
(when (re-search-forward "^;;; Commentary:\n+" nil t)
(when (re-search-forward "^;;; Commentary:\n" nil t)
(replace-match ""))
(while (re-search-forward "^\\(;+ ?\\)" nil t)
(replace-match ""))
(goto-char (point-min))
(when (re-search-forward "\\`\\( *\n\\)+" nil t)
(replace-match "")))
(delete-trailing-whitespace)
(let ((coding-system-for-write buffer-file-coding-system))