From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Shmakov Newsgroups: gmane.emacs.bugs Subject: bug#18175: files.el: use mapc in (mapcar 'switch-to-buffer ...) Date: Sun, 03 Aug 2014 18:25:06 +0000 Message-ID: <87ha1tfn25.fsf@violet.siamics.net> References: <87r40yftes.fsf@violet.siamics.net> <3d8bb179-4e59-4d81-9ee1-54ff0da430b0@default> <87mwbmeyva.fsf@violet.siamics.net> <77fd6f4e-8cfd-49d1-884e-c61ce7a075a3@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1407090380 10541 80.91.229.3 (3 Aug 2014 18:26:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Aug 2014 18:26:20 +0000 (UTC) To: 18175@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 03 20:26:15 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1XE0U2-0001y7-MP for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Aug 2014 20:26:14 +0200 Original-Received: from localhost ([::1]:48812 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XE0U1-0007Fk-U2 for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Aug 2014 14:26:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XE0Tv-0007FS-9R for bug-gnu-emacs@gnu.org; Sun, 03 Aug 2014 14:26:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XE0Tr-0006O9-4q for bug-gnu-emacs@gnu.org; Sun, 03 Aug 2014 14:26:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49236) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XE0Tq-0006Nr-Ro for bug-gnu-emacs@gnu.org; Sun, 03 Aug 2014 14:26:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XE0Tq-00041B-Eh for bug-gnu-emacs@gnu.org; Sun, 03 Aug 2014 14:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Shmakov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Aug 2014 18:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18175 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18175-submit@debbugs.gnu.org id=B18175.140709031915396 (code B ref 18175); Sun, 03 Aug 2014 18:26:02 +0000 Original-Received: (at 18175) by debbugs.gnu.org; 3 Aug 2014 18:25:19 +0000 Original-Received: from localhost ([127.0.0.1]:56179 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XE0T8-00040E-A6 for submit@debbugs.gnu.org; Sun, 03 Aug 2014 14:25:18 -0400 Original-Received: from fely.am-1.org ([78.47.74.50]:49254) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XE0T5-000403-N1 for 18175@debbugs.gnu.org; Sun, 03 Aug 2014 14:25:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Sender:References:In-Reply-To:Subject:To:From; bh=CM5O5dPAmgIs71OkPDhcsfD+qlMSg2Jz1YZ6GbAXtoQ=; b=F/Kak15DeWkZV+DJXofX2MHifV/LOlQxBeyMSCo0r9W36/EUlYS9wfISX7zdwqwf8tsJSxLrbyD0FfI9p/43JIY/oZ08LxaDbrGCsBRCz5RMhQB3V4FGeELmOM9Jl1kbQzRn96KB7PsHoboYaUpIADa34AbdyTJLjzo7xocZ1lc=; Original-Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XE0T3-000067-Pu for 18175@debbugs.gnu.org; Sun, 03 Aug 2014 18:25:14 +0000 Original-Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XE0Sw-0008Dc-Hj for 18175@debbugs.gnu.org; Mon, 04 Aug 2014 01:25:06 +0700 In-Reply-To: <77fd6f4e-8cfd-49d1-884e-c61ce7a075a3@default> (Drew Adams's message of "Sun, 3 Aug 2014 09:32:29 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:92083 Archived-At: >>>>> Drew Adams writes: [=E2=80=A6] > Your new patch does that, and it looks OK to me. I did not spend > much time looking things over, so I might be missing something, but > it looks like you are not changing the external behavior (good). > It is fine to optimize things, but function interfaces (signatures > and behavior as viewed by calling functions or by users) should not > be altered. I expect neither of these patches to change the external behavior. > You might want to make sure that the list of buffers returned is the > same in all cases as what is returned today. The doc string of > `switch-to-buffer', for instance, seems to make a point of saying > that it returns the buffer switched to. It does not say that it > returns the buffer indicated by argument BUFFER-OR-NAME. Dunno why, > but it does. I guess it=E2=80=99s because switch-to-buffer passes its argument through window-normalize-buffer-to-switch-to, which passes it through get-buffer in turn. The docstring for the latter reads: =E2=80=A6 If BUFFER-OR-NAME is a buffer, return it as given. And I see no reason for a buffer /name/ to ever appear in the lists returned from find-file-noselect. > I'm guessing that that can make a difference only if the intended > buffer cannot be switched to (an error is raised). And in that case > I'm guessing that the error raised would be handled correctly by > `find-file*'. (I have not checked.) As there=E2=80=99re no condition-case forms around switch-to-buffer calls in find-file et al. =E2=80=93 no such error will be handled in any special way, and will just be signalled to the user as usual. > You might also want to check to be sure that the effect on what > `buffer-list' returns (after the calls to `switch-buffer*') remains > the same. AIUI, the buffer-list result depends solely on the order of calls to switch-to-buffer, which is /not/ changed in any way. > The calls to `switch-to-buffer*' here do not use non-nil NORECORD, so > that at least can be ignored. But maybe take a look, to make sure. > Some commands and other functions depend on the buffer order in > `buffer-list', so this too should not be altered by your proposed > change. --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A