From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric James Michael Ritz Newsgroups: gmane.emacs.help Subject: Working Around for cl-count Date: Thu, 29 Nov 2012 11:06:48 -0500 Message-ID: <50B78818.7080906@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1354211380 7242 80.91.229.3 (29 Nov 2012 17:49:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Nov 2012 17:49:40 +0000 (UTC) To: gnu-emacs-help@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 29 18:49:52 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 1Te8FA-0000Bq-VM for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Nov 2012 18:49:49 +0100 Original-Received: from localhost ([::1]:41082 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Te8Ez-0005KN-Mq for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Nov 2012 12:49:37 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:48664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Te6dk-0008CC-Id for help-gnu-emacs@gnu.org; Thu, 29 Nov 2012 11:07:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Te6dj-0002UT-Kp for help-gnu-emacs@gnu.org; Thu, 29 Nov 2012 11:07:04 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35531) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Te6dj-0002UP-H3 for help-gnu-emacs@gnu.org; Thu, 29 Nov 2012 11:07:03 -0500 Original-Received: from [2001:4830:134:3::10] (port=43294 helo=eggs.gnu.org) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1Te6di-0002iC-I7 for gnu-emacs-help@gnu.org; Thu, 29 Nov 2012 11:07:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Te6dZ-0002TD-2t for gnu-emacs-help@gnu.org; Thu, 29 Nov 2012 11:07:02 -0500 Original-Received: from mail-ye0-f169.google.com ([209.85.213.169]:52631) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Te6dY-0002T7-Tc for gnu-emacs-help@gnu.org; Thu, 29 Nov 2012 11:06:53 -0500 Original-Received: by mail-ye0-f169.google.com with SMTP id j12so2429970yeg.0 for ; Thu, 29 Nov 2012 08:06:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=7Hys4ZktV1YB80ncSeTZJjxdFmKmKx3Yk274S0aAJLo=; b=Vqax4VhnQZz90PMxi0sffIMq/uBChnDQcDMQaX45bfRigmPEeS2SvJQ/QAQJNc4VCw 9KUFjqIX1LGzlnL/q6EdX/1erw49rpFOw7nrctAVUOmYlG2oY2R6WR45p8wlwZZ7NS06 Hy4W09+ndFA1dNFIhzgQOaMrZ33phxNBUz+TNVW65KvkgxQv0prp7Dxzdwv2C/57ax1v QKO7phgE59plwpT6a198ELfuIrumeCmcVCOGvwq4HgSYlrAd5U42Pm25WzwFCoq8L473 KSQz31RBZo1oGkrp9QPmqVGWYsRlVicN64J4GivjjOCyylHna65Ad1rZ9qEBUqSHiPvL RN0g== Original-Received: by 10.101.94.20 with SMTP id w20mr6947344anl.2.1354205211095; Thu, 29 Nov 2012 08:06:51 -0800 (PST) Original-Received: from [192.168.1.102] (75-137-110-177.static.gnvl.sc.charter.com. [75.137.110.177]) by mx.google.com with ESMTPS id g79sm2034460yhj.6.2012.11.29.08.06.49 (version=SSLv3 cipher=OTHER); Thu, 29 Nov 2012 08:06:49 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-Mailman-Approved-At: Thu, 29 Nov 2012 12:49:32 -0500 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:87943 Archived-At:

(My apologies if this is a repost. It has been a hectic morning.)

Hello my fellow Elisp hackers,

I am maintaining a php-mode for those Emacs users writin PHP software. Recently improvide formatting for anonymous functions when used as arguments to functions. The code for the formatting look is thus:

(defun php-unindent-closure ()
  (let ((syntax (mapcar 'car c-syntactic-context)))
    (if (and (member 'arglist-cont-nonempty syntax)
             (or
              (member 'statement-block-intro syntax)
              (member 'brace-list-intro syntax)
              (member 'brace-list-close syntax)
              (member 'block-close syntax)))
        (save-excursion
          (beginning-of-line)
          (delete-char (* (cl-count 'arglist-cont-nonempty syntax)
                          c-basic-offset))))))

Versions of Emacs less than version 24.2 complain about the lack of cl-count. Does anyone have suggestions about a good way to handle the non-existence of cl-count in previous version?

Thank you in advanced for the help.

-- ejmr 南無妙法蓮華經