From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] package.el: Kill "PKGNAME-autoloads.el" buffer Date: Sun, 28 Oct 2012 16:43:01 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1351456991 30582 80.91.229.3 (28 Oct 2012 20:43:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Oct 2012 20:43:11 +0000 (UTC) Cc: emacs-devel@gnu.org To: Daniel Hackney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 28 21:43:20 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TSZhT-0007s8-VL for ged-emacs-devel@m.gmane.org; Sun, 28 Oct 2012 21:43:16 +0100 Original-Received: from localhost ([::1]:39849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSZhL-0001Zl-VU for ged-emacs-devel@m.gmane.org; Sun, 28 Oct 2012 16:43:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42048) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSZhI-0001ZV-SC for emacs-devel@gnu.org; Sun, 28 Oct 2012 16:43:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSZhH-0008E4-Rf for emacs-devel@gnu.org; Sun, 28 Oct 2012 16:43:04 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:32426) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSZhH-0008Dz-Mu for emacs-devel@gnu.org; Sun, 28 Oct 2012 16:43:03 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu0/O+LET/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLDiYSFBgNJBOICQW6CZBEA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="203032736" Original-Received: from 206-248-177-19.dsl.teksavvy.com (HELO pastel.home) ([206.248.177.19]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 28 Oct 2012 16:43:02 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id BFB1C59415; Sun, 28 Oct 2012 16:43:01 -0400 (EDT) In-Reply-To: (Daniel Hackney's message of "Sun, 28 Oct 2012 13:45:50 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:154566 Archived-At: > 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 + + * emacs-lisp/package.el (package-generate-autoloads): Kill buffer + "PKGNAME-autoloads.el" in case we created it. + 2012-10-28 Stefan Monnier * 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" ())