Function: package-upload-file
package-upload-file is an autoloaded, interactive and byte-compiled
function defined in package-x.el.gz.
Signature
(package-upload-file FILE)
Documentation
Upload the Emacs Lisp package FILE to the package archive.
Interactively, prompt for FILE. The package is considered a
single-file package if FILE ends in ".el", and a multi-file
package if FILE ends in ".tar".
Automatically extract package attributes and update the archive's
contents list with this information.
If package-archive-upload-base does not specify a valid upload
destination, prompt for one. If the directory does not exist, it
is created. The directory need not have any initial contents
(i.e., you can use this command to populate an initially empty
archive).
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/package-x.el.gz
;;;###autoload
(defun package-upload-file (file)
"Upload the Emacs Lisp package FILE to the package archive.
Interactively, prompt for FILE. The package is considered a
single-file package if FILE ends in \".el\", and a multi-file
package if FILE ends in \".tar\".
Automatically extract package attributes and update the archive's
contents list with this information.
If `package-archive-upload-base' does not specify a valid upload
destination, prompt for one. If the directory does not exist, it
is created. The directory need not have any initial contents
\(i.e., you can use this command to populate an initially empty
archive)."
(interactive "fPackage file name: ")
(with-temp-buffer
(insert-file-contents file)
(let ((pkg-desc
(cond
((string-match "\\.tar\\'" file)
(tar-mode) (package-tar-file-info))
((string-match "\\.el\\'" file) (package-buffer-info))
(t (error "Unrecognized extension `%s'"
(file-name-extension file))))))
(package-upload-buffer-internal pkg-desc (file-name-extension file)))))