Commit bd55cd4d authored by Paul Eggert's avatar Paul Eggert

* emacs-lisp/package.el: Spelling fixes and use active voice.

parent 454184fd
2015-04-01 Paul Eggert <eggert@cs.ucla.edu>
* emacs-lisp/package.el: Spelling fixes and use active voice.
2015-04-01 Artur Malabarba <bruce.connor.am@gmail.com> 2015-04-01 Artur Malabarba <bruce.connor.am@gmail.com>
* emacs-lisp/package.el: Implement asynchronous refreshing. * emacs-lisp/package.el: Implement asynchronous refreshing.
......
...@@ -1084,11 +1084,11 @@ buffer is killed afterwards. Return the last value in BODY." ...@@ -1084,11 +1084,11 @@ buffer is killed afterwards. Return the last value in BODY."
(defmacro package--with-work-buffer-async (location file async &rest body) (defmacro package--with-work-buffer-async (location file async &rest body)
"Run BODY in a buffer containing the contents of FILE at LOCATION. "Run BODY in a buffer containing the contents of FILE at LOCATION.
If ASYNC is non-nil, and if it is possible, the operation is run If ASYNC is non-nil, and if it is possible, run BODY
asynchronously. If an error is encountered and ASYNC is a asynchronously. If an error is encountered and ASYNC is a
function, it is called with no arguments (instead of executing function, call it with no arguments (instead of executing BODY),
body), otherwise the error is propagated. For description on the otherwise propagate the error. For description of the other
other arguments see `package--with-work-buffer'." arguments see `package--with-work-buffer'."
(declare (indent 3) (debug t)) (declare (indent 3) (debug t))
`(if (or (not ,async) `(if (or (not ,async)
(not (string-match-p "\\`https?:" ,location))) (not (string-match-p "\\`https?:" ,location)))
...@@ -1139,7 +1139,7 @@ errors." ...@@ -1139,7 +1139,7 @@ errors."
(defun package--check-signature (location file &optional string async callback) (defun package--check-signature (location file &optional string async callback)
"Check signature of the current buffer. "Check signature of the current buffer.
Signature file is downloaded from LOCATION by appending \".sig\" Download the signature file from LOCATION by appending \".sig\"
to FILE. to FILE.
GnuPG keyring is located under \"gnupg\" in `package-user-dir'. GnuPG keyring is located under \"gnupg\" in `package-user-dir'.
STRING is the string to verify, it defaults to `buffer-string'. STRING is the string to verify, it defaults to `buffer-string'.
...@@ -1407,8 +1407,8 @@ similar to an entry in `package-alist'. Save the cached copy to ...@@ -1407,8 +1407,8 @@ similar to an entry in `package-alist'. Save the cached copy to
(defun package--download-and-read-archives (&optional async) (defun package--download-and-read-archives (&optional async)
"Download descriptions of all `package-archives' and read them. "Download descriptions of all `package-archives' and read them.
This populates `package-archive-contents'. If ASYNC is non-nil, This populates `package-archive-contents'. If ASYNC is non-nil,
the downloads are performed asynchronously." perform the downloads asynchronously."
;; The dowloaded archive contents will be read as part of ;; The downloaded archive contents will be read as part of
;; `package--update-downloads-in-progress'. ;; `package--update-downloads-in-progress'.
(setq package--downloads-in-progress package-archives) (setq package--downloads-in-progress package-archives)
(dolist (archive package-archives) (dolist (archive package-archives)
...@@ -1423,8 +1423,8 @@ the downloads are performed asynchronously." ...@@ -1423,8 +1423,8 @@ the downloads are performed asynchronously."
For each archive configured in the variable `package-archives', For each archive configured in the variable `package-archives',
inform Emacs about the latest versions of all packages it offers, inform Emacs about the latest versions of all packages it offers,
and make them available for download. and make them available for download.
Optional argument, ASYNC, specifies whether the downloads should Optional argument ASYNC specifies whether to perform the
be performed in the background." downloads in the background."
(interactive) (interactive)
;; FIXME: Do it asynchronously. ;; FIXME: Do it asynchronously.
(unless (file-exists-p package-user-dir) (unless (file-exists-p package-user-dir)
...@@ -2763,7 +2763,7 @@ Store this list in `package-menu--new-package-list'." ...@@ -2763,7 +2763,7 @@ Store this list in `package-menu--new-package-list'."
(setq package-menu--old-archive-contents nil))) (setq package-menu--old-archive-contents nil)))
(defun package-menu--find-and-notify-upgrades () (defun package-menu--find-and-notify-upgrades ()
"Notify the user of upgradeable packages." "Notify the user of upgradable packages."
(when-let ((upgrades (package-menu--find-upgrades))) (when-let ((upgrades (package-menu--find-upgrades)))
(message "%d package%s can be upgraded; type `%s' to mark %s for upgrading." (message "%d package%s can be upgraded; type `%s' to mark %s for upgrading."
(length upgrades) (length upgrades)
...@@ -2772,10 +2772,9 @@ Store this list in `package-menu--new-package-list'." ...@@ -2772,10 +2772,9 @@ Store this list in `package-menu--new-package-list'."
(if (= (length upgrades) 1) "it" "them")))) (if (= (length upgrades) 1) "it" "them"))))
(defun package-menu--post-refresh () (defun package-menu--post-refresh ()
"Function to be called after `package-refresh-contents' is done. "Check for new packages, revert the *Packages* buffer, and check for upgrades.
Checks for new packages, reverts the *Packages* buffer, and This function is called after `package-refresh-contents' is done.
checks for upgrades. It goes in `package--post-download-archives-hook', so that it
This goes in `package--post-download-archives-hook', so that it
works with async refresh as well." works with async refresh as well."
(package-menu--populate-new-package-list) (package-menu--populate-new-package-list)
(let ((buf (get-buffer "*Packages*"))) (let ((buf (get-buffer "*Packages*")))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment