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: [Warning] cl-count (And Other Options) Date: Fri, 30 Nov 2012 17:01:58 -0500 Message-ID: <50B92CD6.20809@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1354312932 8301 80.91.229.3 (30 Nov 2012 22:02:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Nov 2012 22:02:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 30 23:02:25 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 1TeYf8-0004zo-C4 for geh-help-gnu-emacs@m.gmane.org; Fri, 30 Nov 2012 23:02:22 +0100 Original-Received: from localhost ([::1]:53283 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeYew-0007Uv-VW for geh-help-gnu-emacs@m.gmane.org; Fri, 30 Nov 2012 17:02:10 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:58426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeYeq-0007Uq-QB for help-gnu-emacs@gnu.org; Fri, 30 Nov 2012 17:02:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TeYep-0005AT-FT for help-gnu-emacs@gnu.org; Fri, 30 Nov 2012 17:02:04 -0500 Original-Received: from mail-yh0-f52.google.com ([209.85.213.52]:40718) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeYep-0005AB-BV for help-gnu-emacs@gnu.org; Fri, 30 Nov 2012 17:02:03 -0500 Original-Received: by mail-yh0-f52.google.com with SMTP id o22so2700814yho.39 for ; Fri, 30 Nov 2012 14:02:01 -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=JLyobyuRwhMDJMsnEK31kwj2WdG+lp9niY+0wnilN24=; b=jC1LMoB8wngtW+iaAFBr4LzOHlF/6h0x1lSeL3snjm+oi/lfQOj9O3KH9HJNr+641+ fz+x0KpwgrA9MGWplijiXrCY4dcRa1UfJMBtAGoursi6hznKdKnRFYCeaN22HMxJMe05 My9A2cvySXqK6emhLdzz0fOrbfJlajyH7rFfsHKxcsS4GGkyI5ju7d15O4ptxwdwzHwS zHobpIRLi8tbDEuGrkYr/CkXduMzcmAScCEz/OkddAZccNPxE1oNJrpLZRkYpqVKCY8O C+PNIyW7go+L/qVLK5uz+ob7Lfconibvdj1B/UGjo8/ZeK5Pc28N4PHSR2vcgjRmOEL9 V11w== Original-Received: by 10.236.130.199 with SMTP id k47mr3076795yhi.126.1354312921002; Fri, 30 Nov 2012 14:02:01 -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 s21sm6193998yhb.5.2012.11.30.14.01.58 (version=SSLv3 cipher=OTHER); Fri, 30 Nov 2012 14:01:59 -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-Received-From: 209.85.213.52 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:87980 Archived-At: First my apologies if this email would be more appropriate elsewhere. I am currently using GNU Emacs 24.2.90.1 (i686-pc-linux-gnu, GTK+ Version 2.24.13), compiled on the 24th of November 2012. In a function in my php-mode [1] I have the following function definition: (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 (let ((count-func (if (fboundp 'cl-count) #'cl-count #'count)()))) (beginning-of-line) (delete-char (* (cl-count 'arglist-cont-nonempty syntax) c-basic-offset)))))) The key thing to note (unless you see something glaringly wrong with it) is the call to `cl-count`. When I compile the file containing the function I receive the following warning: Compiling file /home/eric/Projects/php-mode/php-mode.el at Fri Nov 30 16:49:05 2012 In php-unindent-closure: php-mode.el:436:8:Warning: malformed let binding: `(count-func (if (fboundp (quote cl-count)) (function cl-count) (function count)) nil) The warning leads me to believe that use of `cl-count` is not encouraged. Is that the case? And if so, what would be my best alternative which would not trigger a warning? Thank you in advanced! [1]: https://github.com/ejmr/php-mode -- ejmr 南無妙法蓮華經