From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/72763 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: `reduce', a cl function, used in shr.el Date: Fri, 08 Oct 2010 10:02:49 +0900 Organization: Emacsen advocacy group Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1286499900 31375 80.91.229.12 (8 Oct 2010 01:05:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Oct 2010 01:05:00 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M21135@lists.math.uh.edu Fri Oct 08 03:04:56 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P41OH-0004Zr-5v for ding-account@gmane.org; Fri, 08 Oct 2010 03:04:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1P41NA-0008Px-3g; Thu, 07 Oct 2010 20:03:44 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1P41N8-0008Pf-6d for ding@lists.math.uh.edu; Thu, 07 Oct 2010 20:03:42 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1P41N6-0007Vz-Gz for ding@lists.math.uh.edu; Thu, 07 Oct 2010 20:03:41 -0500 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1P41N5-0004Dt-00 for ; Fri, 08 Oct 2010 03:03:39 +0200 Original-Received: from localhost ([127.0.0.1]:35277) by orlando.hostforweb.net with esmtpa (Exim 4.69) (envelope-from ) id 1P41MS-0003yK-I8 for ding@gnus.org; Thu, 07 Oct 2010 20:03:00 -0500 X-Hashcash: 1:20:101008:ding@gnus.org::gTptoiLvjBUxm4Ps:00002yqm User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:Y8iMtlwoztDN8P5TNURliYQdQv8= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:72763 Archived-At: Is this ok? --- shr.el~ 2010-10-07 22:00:24 +0000 +++ shr.el 2010-10-08 01:01:35 +0000 @@ -548,8 +548,8 @@ (aset natural-widths i (max (aref natural-widths i) (cadr column))) (setq i (1+ i))))) - (let ((extra (- (reduce '+ suggested-widths) - (reduce '+ widths))) + (let ((extra (- (apply '+ (append suggested-widths nil)) + (apply '+ (append widths nil)))) (expanded-columns 0)) (when (> extra 0) (dotimes (i length) The following is `reduce' from which the cl keywords feature is removed; same as `(apply FUNCTION (append SEQ nil))': (defun shr-reduce (function seq) "Reduce two-argument FUNCTION across SEQ." (or (listp seq) (setq seq (append seq nil))) (let ((accum (pop seq))) (while seq (setq accum (funcall function accum (pop seq)))) accum))