Function: package--update-file
package--update-file is a byte-compiled function defined in
package-x.el.gz.
Signature
(package--update-file FILE TAG TEXT)
Documentation
Update the package archive file named FILE.
FILE should be relative to package-archive-upload-base.
TAG is a string that can be found within the file; TEXT is
inserted after its first occurrence in the file.
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/package-x.el.gz
(defun package--update-file (file tag text)
"Update the package archive file named FILE.
FILE should be relative to `package-archive-upload-base'.
TAG is a string that can be found within the file; TEXT is
inserted after its first occurrence in the file."
(setq file (expand-file-name file package-archive-upload-base))
(save-excursion
(let ((old-buffer (find-buffer-visiting file)))
(with-current-buffer (let ((find-file-visit-truename t))
(or old-buffer (find-file-noselect file)))
(goto-char (point-min))
(search-forward tag)
(forward-line)
(insert text)
(let ((file-precious-flag t))
(save-buffer))
(unless old-buffer
(kill-buffer (current-buffer)))))))