aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2015-04-01 10:21:47 -0700
committerPaul Eggert2015-04-01 10:22:20 -0700
commitbd55cd4d246c031151dc338813cb9c8ca5ea33dd (patch)
tree75cbd24bed3913599e8597cbe53a4b9e06f8fdf2
parent454184fd59e35f8608674b98b61732be061e10d4 (diff)
downloademacs-bd55cd4d246c031151dc338813cb9c8ca5ea33dd.tar.gz
emacs-bd55cd4d246c031151dc338813cb9c8ca5ea33dd.zip
* emacs-lisp/package.el: Spelling fixes and use active voice.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/emacs-lisp/package.el27
2 files changed, 17 insertions, 14 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b35c78da09e..46f519ef306 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12015-04-01 Paul Eggert <eggert@cs.ucla.edu>
2
3 * emacs-lisp/package.el: Spelling fixes and use active voice.
4
12015-04-01 Artur Malabarba <bruce.connor.am@gmail.com> 52015-04-01 Artur Malabarba <bruce.connor.am@gmail.com>
2 6
3 * emacs-lisp/package.el: Implement asynchronous refreshing. 7 * emacs-lisp/package.el: Implement asynchronous refreshing.
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 490fb45a98f..583598ee10c 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1084,11 +1084,11 @@ buffer is killed afterwards. Return the last value in BODY."
1084 1084
1085(defmacro package--with-work-buffer-async (location file async &rest body) 1085(defmacro package--with-work-buffer-async (location file async &rest body)
1086 "Run BODY in a buffer containing the contents of FILE at LOCATION. 1086 "Run BODY in a buffer containing the contents of FILE at LOCATION.
1087If ASYNC is non-nil, and if it is possible, the operation is run 1087If ASYNC is non-nil, and if it is possible, run BODY
1088asynchronously. If an error is encountered and ASYNC is a 1088asynchronously. If an error is encountered and ASYNC is a
1089function, it is called with no arguments (instead of executing 1089function, call it with no arguments (instead of executing BODY),
1090body), otherwise the error is propagated. For description on the 1090otherwise propagate the error. For description of the other
1091other arguments see `package--with-work-buffer'." 1091arguments see `package--with-work-buffer'."
1092 (declare (indent 3) (debug t)) 1092 (declare (indent 3) (debug t))
1093 `(if (or (not ,async) 1093 `(if (or (not ,async)
1094 (not (string-match-p "\\`https?:" ,location))) 1094 (not (string-match-p "\\`https?:" ,location)))
@@ -1139,7 +1139,7 @@ errors."
1139 1139
1140(defun package--check-signature (location file &optional string async callback) 1140(defun package--check-signature (location file &optional string async callback)
1141 "Check signature of the current buffer. 1141 "Check signature of the current buffer.
1142Signature file is downloaded from LOCATION by appending \".sig\" 1142Download the signature file from LOCATION by appending \".sig\"
1143to FILE. 1143to FILE.
1144GnuPG keyring is located under \"gnupg\" in `package-user-dir'. 1144GnuPG keyring is located under \"gnupg\" in `package-user-dir'.
1145STRING is the string to verify, it defaults to `buffer-string'. 1145STRING 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(defun package--download-and-read-archives (&optional async) 1407(defun package--download-and-read-archives (&optional async)
1408 "Download descriptions of all `package-archives' and read them. 1408 "Download descriptions of all `package-archives' and read them.
1409This populates `package-archive-contents'. If ASYNC is non-nil, 1409This populates `package-archive-contents'. If ASYNC is non-nil,
1410the downloads are performed asynchronously." 1410perform the downloads asynchronously."
1411 ;; The dowloaded archive contents will be read as part of 1411 ;; The downloaded archive contents will be read as part of
1412 ;; `package--update-downloads-in-progress'. 1412 ;; `package--update-downloads-in-progress'.
1413 (setq package--downloads-in-progress package-archives) 1413 (setq package--downloads-in-progress package-archives)
1414 (dolist (archive package-archives) 1414 (dolist (archive package-archives)
@@ -1423,8 +1423,8 @@ the downloads are performed asynchronously."
1423For each archive configured in the variable `package-archives', 1423For each archive configured in the variable `package-archives',
1424inform Emacs about the latest versions of all packages it offers, 1424inform Emacs about the latest versions of all packages it offers,
1425and make them available for download. 1425and make them available for download.
1426Optional argument, ASYNC, specifies whether the downloads should 1426Optional argument ASYNC specifies whether to perform the
1427be performed in the background." 1427downloads in the background."
1428 (interactive) 1428 (interactive)
1429 ;; FIXME: Do it asynchronously. 1429 ;; FIXME: Do it asynchronously.
1430 (unless (file-exists-p package-user-dir) 1430 (unless (file-exists-p package-user-dir)
@@ -2763,7 +2763,7 @@ Store this list in `package-menu--new-package-list'."
2763 (setq package-menu--old-archive-contents nil))) 2763 (setq package-menu--old-archive-contents nil)))
2764 2764
2765(defun package-menu--find-and-notify-upgrades () 2765(defun package-menu--find-and-notify-upgrades ()
2766 "Notify the user of upgradeable packages." 2766 "Notify the user of upgradable packages."
2767 (when-let ((upgrades (package-menu--find-upgrades))) 2767 (when-let ((upgrades (package-menu--find-upgrades)))
2768 (message "%d package%s can be upgraded; type `%s' to mark %s for upgrading." 2768 (message "%d package%s can be upgraded; type `%s' to mark %s for upgrading."
2769 (length upgrades) 2769 (length upgrades)
@@ -2772,10 +2772,9 @@ Store this list in `package-menu--new-package-list'."
2772 (if (= (length upgrades) 1) "it" "them")))) 2772 (if (= (length upgrades) 1) "it" "them"))))
2773 2773
2774(defun package-menu--post-refresh () 2774(defun package-menu--post-refresh ()
2775 "Function to be called after `package-refresh-contents' is done. 2775 "Check for new packages, revert the *Packages* buffer, and check for upgrades.
2776Checks for new packages, reverts the *Packages* buffer, and 2776This function is called after `package-refresh-contents' is done.
2777checks for upgrades. 2777It goes in `package--post-download-archives-hook', so that it
2778This goes in `package--post-download-archives-hook', so that it
2779works with async refresh as well." 2778works with async refresh as well."
2780 (package-menu--populate-new-package-list) 2779 (package-menu--populate-new-package-list)
2781 (let ((buf (get-buffer "*Packages*"))) 2780 (let ((buf (get-buffer "*Packages*")))