aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2014-01-22 14:22:45 -0500
committerStefan Monnier2014-01-22 14:22:45 -0500
commit29afcbab15aa77b04cb99d0977a85df22df4feac (patch)
tree813bd794a5aff37a186f9bc17a73e00aa8eb6337
parentdc217d0180ce964d4a4cb9abf505c7654eab658d (diff)
downloademacs-29afcbab15aa77b04cb99d0977a85df22df4feac.tar.gz
emacs-29afcbab15aa77b04cb99d0977a85df22df4feac.zip
* lisp/emacs-lisp/package.el: Write files silently.
(package-autoload-ensure-default-file) (package-generate-description-file, package--write-file-no-coding) (package-install-from-archive, package--download-one-archive): Tell `write-region' to stay quiet. (package-menu-mode, package-menu--print-info): Omit the Archive column if there's only one archive. (package-all-keywords, package--has-keyword-p): Remove dead code.
-rw-r--r--lisp/ChangeLog17
-rw-r--r--lisp/emacs-lisp/package.el74
2 files changed, 51 insertions, 40 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8731930cbba..dc93d5c3cfe 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12014-01-22 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * emacs-lisp/package.el: Write files silently.
4 (package-autoload-ensure-default-file, package--write-file-no-coding)
5 (package-generate-description-file, package--download-one-archive)
6 (package-install-from-archive): Tell `write-region' to stay quiet.
7 (package-menu-mode, package-menu--print-info): Omit the Archive column
8 if there's only one archive.
9 (package-all-keywords, package--has-keyword-p): Remove dead code.
10
12014-01-22 Glenn Morris <rgm@gnu.org> 112014-01-22 Glenn Morris <rgm@gnu.org>
2 12
3 * version.el (emacs-bzr-version-bzr): Fix typo. 13 * version.el (emacs-bzr-version-bzr): Fix typo.
@@ -11,10 +21,9 @@
112014-01-22 Martin Rudalics <rudalics@gmx.at> 212014-01-22 Martin Rudalics <rudalics@gmx.at>
12 22
13 Fixes in window size functions around Bug#16430 and Bug#16470. 23 Fixes in window size functions around Bug#16430 and Bug#16470.
14 * window.el (window-total-size, window-size): New argument 24 * window.el (window-total-size, window-size): New argument ROUND.
15 ROUND. 25 (window--min-delta-1, window-min-delta, window--max-delta-1):
16 (window--min-delta-1, window-min-delta, window--max-delta-1): Be 26 Be more conservative when calculating the numbers of lines or
17 more conservative when calculating the numbers of lines or
18 columns a window can shrink (Bug#16430). 27 columns a window can shrink (Bug#16430).
19 (fit-window-to-buffer): Simplify code. 28 (fit-window-to-buffer): Simplify code.
20 * term.el (term-window-width): Call window-body-width again. 29 * term.el (term-window-width): Call window-body-width again.
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 1daa9c04083..bc8651641ac 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -641,7 +641,7 @@ EXTRA-PROPERTIES is currently unused."
641 ";; End:\n" 641 ";; End:\n"
642 ";;; " (file-name-nondirectory file) 642 ";;; " (file-name-nondirectory file)
643 " ends here\n") 643 " ends here\n")
644 nil file)) 644 nil file nil 'silent))
645 file) 645 file)
646 646
647(defvar generated-autoload-file) 647(defvar generated-autoload-file)
@@ -709,8 +709,7 @@ untar into a directory named DIR; otherwise, signal an error."
709 (package--alist-to-plist 709 (package--alist-to-plist
710 (package-desc-extras pkg-desc)))) 710 (package-desc-extras pkg-desc))))
711 "\n") 711 "\n")
712 nil 712 nil pkg-file nil 'silent))))
713 pkg-file))))
714 713
715(defun package--alist-to-plist (alist) 714(defun package--alist-to-plist (alist)
716 (apply #'nconc (mapcar (lambda (pair) (list (car pair) (cdr pair))) alist))) 715 (apply #'nconc (mapcar (lambda (pair) (list (car pair) (cdr pair))) alist)))
@@ -759,7 +758,7 @@ untar into a directory named DIR; otherwise, signal an error."
759 758
760(defun package--write-file-no-coding (file-name) 759(defun package--write-file-no-coding (file-name)
761 (let ((buffer-file-coding-system 'no-conversion)) 760 (let ((buffer-file-coding-system 'no-conversion))
762 (write-region (point-min) (point-max) file-name))) 761 (write-region (point-min) (point-max) file-name nil 'silent)))
763 762
764(defmacro package--with-work-buffer (location file &rest body) 763(defmacro package--with-work-buffer (location file &rest body)
765 "Run BODY in a buffer containing the contents of FILE at LOCATION. 764 "Run BODY in a buffer containing the contents of FILE at LOCATION.
@@ -874,7 +873,8 @@ GnuPG keyring is located under \"gnupg\" in `package-user-dir'."
874 (expand-file-name 873 (expand-file-name
875 (concat (package-desc-full-name pkg-desc) 874 (concat (package-desc-full-name pkg-desc)
876 ".signed") 875 ".signed")
877 package-user-dir)) 876 package-user-dir)
877 nil 'silent)
878 ;; Update the old pkg-desc which will be shown on the description buffer. 878 ;; Update the old pkg-desc which will be shown on the description buffer.
879 (setf (package-desc-signed pkg-desc) t) 879 (setf (package-desc-signed pkg-desc) t)
880 ;; Update the new (activated) pkg-desc as well. 880 ;; Update the new (activated) pkg-desc as well.
@@ -1280,7 +1280,8 @@ similar to an entry in `package-alist'. Save the cached copy to
1280 ;; Write out good signatures into archive-contents.signed file. 1280 ;; Write out good signatures into archive-contents.signed file.
1281 (write-region (mapconcat #'epg-signature-to-string good-signatures "\n") 1281 (write-region (mapconcat #'epg-signature-to-string good-signatures "\n")
1282 nil 1282 nil
1283 (expand-file-name (concat file ".signed") dir))))) 1283 (expand-file-name (concat file ".signed") dir)
1284 nil 'silent))))
1284 1285
1285(declare-function epg-check-configuration "epg-config" 1286(declare-function epg-check-configuration "epg-config"
1286 (config &optional minimum-version)) 1287 (config &optional minimum-version))
@@ -1636,11 +1637,13 @@ If optional arg NO-ACTIVATE is non-nil, don't activate packages."
1636Letters do not insert themselves; instead, they are commands. 1637Letters do not insert themselves; instead, they are commands.
1637\\<package-menu-mode-map> 1638\\<package-menu-mode-map>
1638\\{package-menu-mode-map}" 1639\\{package-menu-mode-map}"
1639 (setq tabulated-list-format [("Package" 18 package-menu--name-predicate) 1640 (setq tabulated-list-format
1640 ("Version" 12 nil) 1641 `[("Package" 18 package-menu--name-predicate)
1641 ("Status" 10 package-menu--status-predicate) 1642 ("Version" 12 nil)
1642 ("Archive" 10 package-menu--archive-predicate) 1643 ("Status" 10 package-menu--status-predicate)
1643 ("Description" 0 nil)]) 1644 ,@(if (cdr package-archives)
1645 '(("Archive" 10 package-menu--archive-predicate)))
1646 ("Description" 0 nil)])
1644 (setq tabulated-list-padding 2) 1647 (setq tabulated-list-padding 2)
1645 (setq tabulated-list-sort-key (cons "Status" nil)) 1648 (setq tabulated-list-sort-key (cons "Status" nil))
1646 (add-hook 'tabulated-list-revert-hook 'package-menu--refresh nil t) 1649 (add-hook 'tabulated-list-revert-hook 'package-menu--refresh nil t)
@@ -1737,8 +1740,7 @@ KEYWORDS should be nil or a list of keywords."
1737 "Collect all package keywords" 1740 "Collect all package keywords"
1738 (let (keywords) 1741 (let (keywords)
1739 (package--mapc (lambda (desc) 1742 (package--mapc (lambda (desc)
1740 (let* ((extras (and desc (package-desc-extras desc))) 1743 (let* ((desc-keywords (and desc (package-desc--keywords desc))))
1741 (desc-keywords (and desc (package-desc--keywords desc))))
1742 (setq keywords (append keywords desc-keywords))))) 1744 (setq keywords (append keywords desc-keywords)))))
1743 keywords)) 1745 keywords))
1744 1746
@@ -1779,8 +1781,7 @@ Built-in packages are converted with `package--from-builtin'."
1779 "Test if package DESC has any of the given KEYWORDS. 1781 "Test if package DESC has any of the given KEYWORDS.
1780When none are given, the package matches." 1782When none are given, the package matches."
1781 (if keywords 1783 (if keywords
1782 (let* ((extras (and desc (package-desc-extras desc))) 1784 (let* ((desc-keywords (and desc (package-desc--keywords desc)))
1783 (desc-keywords (and desc (package-desc--keywords desc)))
1784 found) 1785 found)
1785 (dolist (k keywords) 1786 (dolist (k keywords)
1786 (when (and (not found) 1787 (when (and (not found)
@@ -1816,28 +1817,29 @@ Return (PKG-DESC [NAME VERSION STATUS DOC])."
1816 (let* ((pkg-desc (car pkg)) 1817 (let* ((pkg-desc (car pkg))
1817 (status (cdr pkg)) 1818 (status (cdr pkg))
1818 (face (pcase status 1819 (face (pcase status
1819 (`"built-in" 'font-lock-builtin-face) 1820 (`"built-in" 'font-lock-builtin-face)
1820 (`"available" 'default) 1821 (`"available" 'default)
1821 (`"new" 'bold) 1822 (`"new" 'bold)
1822 (`"held" 'font-lock-constant-face) 1823 (`"held" 'font-lock-constant-face)
1823 (`"disabled" 'font-lock-warning-face) 1824 (`"disabled" 'font-lock-warning-face)
1824 (`"installed" 'font-lock-comment-face) 1825 (`"installed" 'font-lock-comment-face)
1825 (`"unsigned" 'font-lock-warning-face) 1826 (`"unsigned" 'font-lock-warning-face)
1826 (_ 'font-lock-warning-face)))) ; obsolete. 1827 (_ 'font-lock-warning-face)))) ; obsolete.
1827 (list pkg-desc 1828 (list pkg-desc
1828 (vector (list (symbol-name (package-desc-name pkg-desc)) 1829 `[,(list (symbol-name (package-desc-name pkg-desc))
1829 'face 'link 1830 'face 'link
1830 'follow-link t 1831 'follow-link t
1831 'package-desc pkg-desc 1832 'package-desc pkg-desc
1832 'action 'package-menu-describe-package) 1833 'action 'package-menu-describe-package)
1833 (propertize (package-version-join 1834 ,(propertize (package-version-join
1834 (package-desc-version pkg-desc)) 1835 (package-desc-version pkg-desc))
1835 'font-lock-face face) 1836 'font-lock-face face)
1836 (propertize status 'font-lock-face face) 1837 ,(propertize status 'font-lock-face face)
1837 (propertize (or (package-desc-archive pkg-desc) "") 1838 ,@(if (cdr package-archives)
1838 'font-lock-face face) 1839 (list (propertize (or (package-desc-archive pkg-desc) "")
1839 (propertize (package-desc-summary pkg-desc) 1840 'font-lock-face face)))
1840 'font-lock-face face))))) 1841 ,(propertize (package-desc-summary pkg-desc)
1842 'font-lock-face face)])))
1841 1843
1842(defun package-menu-refresh () 1844(defun package-menu-refresh ()
1843 "Download the Emacs Lisp package archive. 1845 "Download the Emacs Lisp package archive.