From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.help Subject: Re: Working Around for cl-count Date: Sat, 01 Dec 2012 07:21:20 +0400 Message-ID: <87wqx2xxsf.fsf@yandex.ru> References: <50B78818.7080906@gmail.com> <0C73A16D723C4DFDB090A66D0FBD389E@us.oracle.com> <8738zs427o.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1354332090 16239 80.91.229.3 (1 Dec 2012 03:21:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Dec 2012 03:21:30 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "WJ" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Dec 01 04:21:43 2012 Return-path: Envelope-to: geh-help-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 1Tede9-00060H-6X for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Dec 2012 04:21:41 +0100 Original-Received: from localhost ([::1]:33423 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Teddx-0001h5-Of for geh-help-gnu-emacs@m.gmane.org; Fri, 30 Nov 2012 22:21:29 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tedds-0001gn-WC for help-gnu-emacs@gnu.org; Fri, 30 Nov 2012 22:21:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Teddr-0006GS-RQ for help-gnu-emacs@gnu.org; Fri, 30 Nov 2012 22:21:24 -0500 Original-Received: from mail-lb0-f169.google.com ([209.85.217.169]:50977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Teddr-0006Ff-K6 for help-gnu-emacs@gnu.org; Fri, 30 Nov 2012 22:21:23 -0500 Original-Received: by mail-lb0-f169.google.com with SMTP id gk1so1099039lbb.0 for ; Fri, 30 Nov 2012 19:21:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=305z1rAm10WSfpDX+SzGfC1hAxl+eHWzb7rC4I2x+DY=; b=CMDOzlkveBTA3dPPtDYDyy6crn9pUsbKgsMWSFd96uDp8F8SfGIsq5UioiS775BHlS IuSUgXbBTaukx39etny4T/E8vK4uGgDcOAhQk+ccjtPKlKB0M3F3AzHA9M8yOulkoXCz 6OMUz0toF+5H6Vmyx8ebNvsDQy0MK+YBlZqxqSOJmb+KbpSRspx3GjnwB3v6KfwT1/MG GMz9D8dKKCXc0pUoxR+pBD5Bp7AWccI5xlMK0QMw73eOqLoseggerJ51mOQTpk+sqJAo utTfigGZJTncgNGZB+R/MWMY8YvNOta6Lurt4xUyG/qb+mfVNdt7BQulqzTgrA4gEXQA PQKQ== Original-Received: by 10.152.148.40 with SMTP id tp8mr3200325lab.30.1354332082393; Fri, 30 Nov 2012 19:21:22 -0800 (PST) Original-Received: from SOL ([178.252.98.87]) by mx.google.com with ESMTPS id p9sm2705817lbc.3.2012.11.30.19.21.19 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 30 Nov 2012 19:21:20 -0800 (PST) In-Reply-To: (WJ's message of "1 Dec 2012 01:20:00 GMT") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.217.169 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87987 Archived-At: "WJ" writes: > Dmitry Gutov wrote: > >> "Drew Adams" writes: >> >> >> >> >> Versions of Emacs less than version 24.2 complain about >> >> >> >> the lack of `cl-count`. >> >> >> > >> >> >> > In older versions, `cl-count' is called `count'. >> >> >> > Use something like this: >> >> >> > (if (fboundp 'cl-count) #'cl-count #'count) >> >> >> >> >> >> Or use the `cl-lib' package that's on GNU ELPA. >> >> > >> >> > You can't do that if your code that calls `cl-count' is >> >> > used by others. >> >> > >> >> > What are you going to do? Tell users of your code who have >> >> > Emacs < 24.2 that they must download `cl-lib' from GNU ELPA >> >> > and put it in their `load-path'? Or download it yourself >> >> > and bundle that package with your code? >> >> >> >> You publish your code as package to one of the ELPA >> >> repositories and add "cl-lib" as one of the dependencies. >> > >> > So instead of fixing this at the source-code level, with just a few chars of >> > Lisp, you try to solve the problem at the distribution level: "Just use GNU >> > ELPA". >> > >> > Have hammer, will see nails... >> >> You can use whatever workaround you want, but obviously the shim cl-lib >> published at GNU ELPA is targeted at packages already present in or >> indented for ELPA. > > : (version) > "GNU Emacs 23.4.1 (i386-mingw-nt5.1.2600) > of 2012-02-04 on MARVIN" > : (require 'cl) > : (count 2 (number-sequence 1 22) :key (apply-partially 'gcd 4)) > 6 Yes, it works. Using unprefixed cl functions is all sorts of deprecated, though, hence the recommendation.