[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: Daniel Hackney
Subject: Re: [PATCH] package.el: Kill "PKGNAME-autoloads.el" buffer
Date: Sun, 28 Oct 2012 13:45:50 -0400

Whoops! I should be a bit more careful about killing the right buffer.
Use this patch instead:

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8122b16..ddff5ab 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
+2012-10-28  Daniel Hackney  <address@hidden>
+        * emacs-lisp/package.el (package-generate-autoloads): Kill buffer
+        "PKGNAME-autoloads.el". This prevents the buffers from sticking
+        around after a package installation. If the package is updated or
+        deleted, the left-over buffer can interrupt the automated flow of
+        things.
 2012-10-27  Eli Zaretskii  <address@hidden>

        * profiler.el (profiler-report-make-entry-part): Fix help-echo
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 303642b..636a477 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -587,10 +587,13 @@ EXTRA-PROPERTIES is currently unused."
   (let* ((auto-name (concat name "-autoloads.el"))
         ;;(ignore-name (concat name "-pkg.el"))
         (generated-autoload-file (expand-file-name auto-name pkg-dir))
-        (version-control 'never))
+        (version-control 'never)
+        buf)
     (unless (fboundp 'autoload-ensure-default-file)
       (package-autoload-ensure-default-file generated-autoload-file))
-    (update-directory-autoloads pkg-dir)))
+    (update-directory-autoloads pkg-dir)
+    (when (setq buf (find-buffer-visiting generated-autoload-file))
+      (kill-buffer buf))))

 (defvar tar-parse-info)
 (declare-function tar-untar-buffer "tar-mode" ())

reply via email to

[Prev in Thread] Current Thread [Next in Thread]