Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
5842e489
Commit
5842e489
authored
Apr 05, 2015
by
Richard Stallman
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Conflicts: lisp/ChangeLog
parents
4e23cd0c
fdc52195
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
1 deletion
+43
-1
lisp/ChangeLog
lisp/ChangeLog
+8
-0
lisp/emacs-lisp/package.el
lisp/emacs-lisp/package.el
+35
-1
No files found.
lisp/ChangeLog
View file @
5842e489
...
...
@@ -11,6 +11,11 @@
* net/browse-url.el (browse-url-firefox-program): Prefer IceCat, doc.
(browse-url-firefox-arguments)
(browse-url-firefox-startup-arguments): Doc fix.
2015-04-05 Artur Malabarba <bruce.connor.am@gmail.com>
* emacs-lisp/package.el: Add package-initialize to user-init-file.
(package--ensure-init-file): New function.
(package-install, package-install-from-buffer): Use it.
2015-04-05 Pete Williamson <petewil@chromium.org> (tiny-change)
...
...
@@ -28,6 +33,9 @@
`package-archives' to `package--downloads-in-progress' instead of
overwriting it.
(package--with-work-buffer-async): Protect macro arguments.
(package--download-one-archive)
(package--download-and-read-archives): Prevent
downloads-in-progress list from becoming outdated.
2015-04-04 Michael Albinus <michael.albinus@gmx.de>
...
...
lisp/emacs-lisp/package.el
View file @
5842e489
...
...
@@ -1397,8 +1397,12 @@ similar to an entry in `package-alist'. Save the cached copy to
;; If we care, check it (perhaps async) and *then* write the file.
(
package--check-signature
location
file
content
async
;; This function will be called after signature checking.
(
lambda
(
&optional
good-sigs
)
(
unless
(
or
good-sigs
(
eq
package-check-signature
'allow-unsigned
))
;; Even if the sig fails, this download is done, so
;; remove it from the in-progress list.
(
package--update-downloads-in-progress
archive
)
(
error
"Unsigned archive `%s'"
name
))
;; Write out the archives file.
(
write-region
content
nil
local-file
nil
'silent
)
...
...
@@ -1419,7 +1423,11 @@ perform the downloads asynchronously."
package--downloads-in-progress
))
(
dolist
(
archive
package-archives
)
(
condition-case-unless-debug
nil
(
package--download-one-archive
archive
"archive-contents"
async
)
(
package--download-one-archive
archive
"archive-contents"
;; Called if the async download fails
(
when
async
(
lambda
()
(
package--update-downloads-in-progress
archive
))))
(
error
(
message
"Failed to download `%s' archive."
(
car
archive
))))))
...
...
@@ -1715,6 +1723,30 @@ PACKAGES are satisfied, i.e. that PACKAGES is computed
using
`
package-compute-transaction
'.
"
(mapc #'package-install-from-archive packages))
(defun package--ensure-init-file ()
"
Ensure
that
the
user
's
init
file
calls
`
package-initialize
'.
"
;; Don't mess with the init-file from "
emacs
-Q
".
(when user-init-file
(let ((buffer (find-buffer-visiting user-init-file)))
(with-current-buffer (or buffer (find-file-noselect user-init-file))
(save-excursion
(save-restriction
(widen)
(goto-char (point-min))
(unless (search-forward "
(
package-initialize
)
" nil 'noerror)
(goto-char (point-min))
(insert
"
;; Added by Package.el. This must come before configurations of\n"
";; installed packages. Don't delete this line. If you don't want it,\n"
";; just comment it out by adding a semicolon to the start of the line.\n"
"(package-initialize)\n"
)
(
unless
(
looking-at-p
"$"
)
(
insert
"\n"
))
(
let
((
file-precious-flag
t
))
(
save-buffer
)))
(
unless
buffer
(
kill-buffer
(
current-buffer
)))))))))
;;;###autoload
(
defun
package-install
(
pkg
&optional
dont-select
)
"Install the package PKG.
...
...
@@ -1743,6 +1775,7 @@ to install it but still mark it as selected."
package-archive-contents
))
nil
t
))
nil
)))
(
package--ensure-init-file
)
(
let
((
name
(
if
(
package-desc-p
pkg
)
(
package-desc-name
pkg
)
pkg
)))
...
...
@@ -1786,6 +1819,7 @@ is derived from the main .el file in the directory.
Downloads and installs required packages as needed."
(
interactive
)
(
package--ensure-init-file
)
(
let*
((
pkg-desc
(
cond
((
derived-mode-p
'dired-mode
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment