unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Daniel Hackney <dan@haxney.org>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] package.el: Kill "PKGNAME-autoloads.el" buffer
Date: Sun, 28 Oct 2012 16:43:01 -0400	[thread overview]
Message-ID: <jwvtxtepbvv.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAMqXDZskAA=Dng0UQLog_bAV9J9iKraFY9iEtzxuVh+rTyazkA@mail.gmail.com> (Daniel Hackney's message of "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:

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" ())




      reply	other threads:[~2012-10-28 20:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvtxtepbvv.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=dan@haxney.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).