From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Reachable killed buffers Date: Wed, 12 Sep 2012 10:55:31 -0700 Message-ID: <5050CC93.3010506@cs.ucla.edu> References: <504848D0.4020908@yandex.ru> <5048D826.3040103@yandex.ru> <5049C400.8070400@gmx.at> <504DB6DD.9030002@yandex.ru> <504E042E.5040100@yandex.ru> <504ECB49.4050509@yandex.ru> <50504349.7090603@gmx.at> <50509262.1070601@cs.ucla.edu> <50509533.9000502@yandex.ru> <50509698.5060108@cs.ucla.edu> <505098FB.1020801@gmx.at> <5050B151.2020304@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1347472545 10354 80.91.229.3 (12 Sep 2012 17:55:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Sep 2012 17:55:45 +0000 (UTC) Cc: martin rudalics , Stefan Monnier , emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 12 19:55:48 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 1TBrAA-00019C-1n for ged-emacs-devel@m.gmane.org; Wed, 12 Sep 2012 19:55:46 +0200 Original-Received: from localhost ([::1]:50116 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBrA6-0008Ey-FX for ged-emacs-devel@m.gmane.org; Wed, 12 Sep 2012 13:55:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBrA3-0008Ef-VG for emacs-devel@gnu.org; Wed, 12 Sep 2012 13:55:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBrA2-0007bb-IA for emacs-devel@gnu.org; Wed, 12 Sep 2012 13:55:39 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:36925) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBrA2-0007bJ-CP for emacs-devel@gnu.org; Wed, 12 Sep 2012 13:55:38 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id B8F48A60001; Wed, 12 Sep 2012 10:55:36 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YGQhZb2uL++J; Wed, 12 Sep 2012 10:55:36 -0700 (PDT) Original-Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 3660639E800D; Wed, 12 Sep 2012 10:55:36 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 In-Reply-To: <5050B151.2020304@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 131.179.128.62 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:153255 Archived-At: On 09/12/2012 08:59 AM, Dmitry Antipov wrote: > - Lisp_Object tail; > - for (tail = list; CONSP (tail); tail = XCDR (tail)) > + Lisp_Object tail = list; > + while (CONSP (tail) && !CONS_MARKED_P (XCONS (tail))) ... ... > + tail = XCDR (tail); This will keep killed buffers that happen to follow an item on the list that is already marked for other reasons. Shouldn't all the killed buffers be discarded? Also, as a minor style matter, I prefer the form of that for-loop to the less-clear while loop.