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: [elpa] master 96e61a9 26/26: Add packages/darkroom by merging its upstream subtree Date: Sun, 21 Dec 2014 22:04:11 -0500 Message-ID: References: <20141219190721.4296.62862@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1419217490 20789 80.91.229.3 (22 Dec 2014 03:04:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Dec 2014 03:04:50 +0000 (UTC) Cc: emacs-devel@gnu.org To: joaotavora@gmail.com (=?windows-1252?B?Sm/jbyBU4XZvcmE=?=) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 22 04:04:43 2014 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 1Y2tIY-00065i-5I for ged-emacs-devel@m.gmane.org; Mon, 22 Dec 2014 04:04:42 +0100 Original-Received: from localhost ([::1]:38919 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2tIX-0005WJ-HM for ged-emacs-devel@m.gmane.org; Sun, 21 Dec 2014 22:04:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2tIB-0005Vv-VN for emacs-devel@gnu.org; Sun, 21 Dec 2014 22:04:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y2tI4-0007w4-Ft for emacs-devel@gnu.org; Sun, 21 Dec 2014 22:04:19 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:51363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2tI4-0007vv-CA for emacs-devel@gnu.org; Sun, 21 Dec 2014 22:04:12 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjsPAOwQflTO+ILA/2dsb2JhbABbgweDYIVaxR0EAgKBJBcBAQEBAQF8hAMBAQRWIxALNBIUGA2Id9ZZAQEBAQYBAQEBHpBvB4RIBYsBpC6BeII3gWIhgncBAQE X-IPAS-Result: AjsPAOwQflTO+ILA/2dsb2JhbABbgweDYIVaxR0EAgKBJBcBAQEBAQF8hAMBAQRWIxALNBIUGA2Id9ZZAQEBAQYBAQEBHpBvB4RIBYsBpC6BeII3gWIhgncBAQE X-IronPort-AV: E=Sophos;i="5.07,502,1413259200"; d="scan'208";a="103139482" Original-Received: from 206-248-130-192.dsl.teksavvy.com (HELO pastel.home) ([206.248.130.192]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 21 Dec 2014 22:04:11 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id A54CD1E41; Sun, 21 Dec 2014 22:04:11 -0500 (EST) In-Reply-To: (=?windows-1252?Q?=22Jo=E3o_T=E1vo?= =?windows-1252?Q?ra=22's?= message of "Sun, 21 Dec 2014 20:23:05 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:180460 Archived-At: >>> + (mapc #'(lambda (w) >>> + (with-selected-window w >>> + (darkroom--set-margins))) >>> + (get-buffer-window-list (current-buffer)))) >> >> I recommend the use of `dolist' instead of `mapc' when the body of the >> loop is provided by an anonymous function and we're looping over a list. >> >> If the compiler could tell that we're looping over a list, it could >> auto-transform the mapc call into a dolist (which is slightly more >> efficient), but having to expend it to a loop that handles both lists >> and arrays (like `mapc' does) makes the resulting code no more efficient >> than just using `mapc'. >> > Alright, makes sense. What if I use `(cl-loop for w in ...list...)` > which is my preferred cl-idiom anyway? Use whichever you prefer. I was just pointing out the style I tend to prefer, partly for efficiency reasons (and also because I haven't managed to plug that efficiency problem in the optimizer). Stefan