[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] package.el: Kill "PKGNAME-autoloads.el" buffer
From: |
Stefan Monnier |
Subject: |
Re: [PATCH] package.el: Kill "PKGNAME-autoloads.el" buffer |
Date: |
Sun, 28 Oct 2012 16:43:01 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
> Whoops! I should be a bit more careful about killing the right buffer.
> Use this patch instead:
Thanks, I installed the patch below instead to avoid binding `buf' first
to nil only to later set it to the value we really wanted.
Stefan "down with setq!"
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog 2012-10-28 19:07:52 +0000
+++ lisp/ChangeLog 2012-10-28 20:41:09 +0000
@@ -1,3 +1,8 @@
+2012-10-28 Daniel Hackney <address@hidden>
+
+ * emacs-lisp/package.el (package-generate-autoloads): Kill buffer
+ "PKGNAME-autoloads.el" in case we created it.
+
2012-10-28 Stefan Monnier <address@hidden>
* minibuffer.el (completion--sifn-requote): Rewrite to handle things
=== modified file 'lisp/emacs-lisp/package.el'
--- lisp/emacs-lisp/package.el 2012-10-25 12:38:09 +0000
+++ lisp/emacs-lisp/package.el 2012-10-28 20:40:13 +0000
@@ -590,7 +590,9 @@
(version-control 'never))
(unless (fboundp 'autoload-ensure-default-file)
(package-autoload-ensure-default-file generated-autoload-file))
- (update-directory-autoloads pkg-dir)))
+ (update-directory-autoloads pkg-dir)
+ (let ((buf (find-buffer-visiting generated-autoload-file)))
+ (when buf (kill-buffer buf)))))
(defvar tar-parse-info)
(declare-function tar-untar-buffer "tar-mode" ())