Handle elisp files which have no "version" header, but are otherwise well-formatted

This commit is contained in:
Steve Purcell 2012-04-21 21:07:24 +01:00
parent b5f5bbc7b0
commit eca898099d

View file

@ -387,11 +387,15 @@ FILES if non-nil. The file is written to
(ignore-errors
(with-temp-buffer
(insert-file-contents file-path)
;; next two lines are a hack for some packages that aren't
;; next few lines are a hack for some packages that aren't
;; commented properly.
(goto-char (point-min))
(forward-line)
(insert ";;; Version: 0")
(newline)
(goto-char (point-max))
(insert (concat "\n;;; "
(file-name-nondirectory file-path) " ends here"))
(newline)
(insert ";;; " (file-name-nondirectory file-path) " ends here")
(flet ((package-strip-rcs-id (str) "0"))
(package-buffer-info))))))