* [PATCH] package.el: Kill "PKGNAME-autoloads.el" buffer
@ 2012-10-28 17:11 Daniel Hackney
2012-10-28 17:45 ` Daniel Hackney
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Hackney @ 2012-10-28 17:11 UTC (permalink / raw)
To: emacs-devel
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.
---
lisp/ChangeLog | 8 ++++++++
lisp/emacs-lisp/package.el | 3 ++-
2 files changed, 10 insertions(+), 1 deletion(-)
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 <dan@haxney.org>
+
+ * 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 <eliz@gnu.org>
* 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..a974527 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -590,7 +590,8 @@ EXTRA-PROPERTIES is currently unused."
(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)
+ (kill-buffer (get-buffer auto-name))))
(defvar tar-parse-info)
(declare-function tar-untar-buffer "tar-mode" ())
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] package.el: Kill "PKGNAME-autoloads.el" buffer
2012-10-28 17:11 [PATCH] package.el: Kill "PKGNAME-autoloads.el" buffer Daniel Hackney
@ 2012-10-28 17:45 ` Daniel Hackney
2012-10-28 20:43 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Hackney @ 2012-10-28 17:45 UTC (permalink / raw)
To: emacs-devel
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 <dan@haxney.org>
+
+ * 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 <eliz@gnu.org>
* 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" ())
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] package.el: Kill "PKGNAME-autoloads.el" buffer
2012-10-28 17:45 ` Daniel Hackney
@ 2012-10-28 20:43 ` Stefan Monnier
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2012-10-28 20:43 UTC (permalink / raw)
To: Daniel Hackney; +Cc: emacs-devel
> 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 <dan@haxney.org>
+
+ * emacs-lisp/package.el (package-generate-autoloads): Kill buffer
+ "PKGNAME-autoloads.el" in case we created it.
+
2012-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
* 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" ())
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-28 20:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-28 17:11 [PATCH] package.el: Kill "PKGNAME-autoloads.el" buffer Daniel Hackney
2012-10-28 17:45 ` Daniel Hackney
2012-10-28 20:43 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.