From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stuart D. Herring" Newsgroups: gmane.emacs.devel Subject: Re: cperl-mode instead of perl-mode? (was Re: perl-mode indent bug) Date: Wed, 12 Apr 2006 08:16:35 -0700 (PDT) Message-ID: <40741.128.165.123.132.1144854995.squirrel@webmail.lanl.gov> References: <86d5fn0xue.fsf@blue.stonehenge.com> <86odz7ylrz.fsf@blue.stonehenge.com> Reply-To: herring@lanl.gov NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1144855069 14301 80.91.229.2 (12 Apr 2006 15:17:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 12 Apr 2006 15:17:49 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 12 17:17:47 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FTh5R-00013n-OB for ged-emacs-devel@m.gmane.org; Wed, 12 Apr 2006 17:16:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FTh5R-0001oT-38 for ged-emacs-devel@m.gmane.org; Wed, 12 Apr 2006 11:16:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FTh5E-0001o2-V5 for emacs-devel@gnu.org; Wed, 12 Apr 2006 11:16:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FTh5D-0001nY-9z for emacs-devel@gnu.org; Wed, 12 Apr 2006 11:16:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FTh5D-0001nT-6M for emacs-devel@gnu.org; Wed, 12 Apr 2006 11:16:39 -0400 Original-Received: from [192.65.95.54] (helo=mailwasher-b.lanl.gov) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FThAK-00040m-63 for emacs-devel@gnu.org; Wed, 12 Apr 2006 11:21:56 -0400 Original-Received: from mailrelay2.lanl.gov (mailrelay2.lanl.gov [128.165.4.103]) by mailwasher-b.lanl.gov (8.12.11/8.12.11/(ccn-5)) with ESMTP id k3CFGbgi026347 for ; Wed, 12 Apr 2006 09:16:37 -0600 Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay2.lanl.gov (8.12.11/8.12.11/(ccn-5)) with ESMTP id k3CFGaMv021945; Wed, 12 Apr 2006 09:16:36 -0600 Original-Received: from webmail1.lanl.gov (localhost.localdomain [127.0.0.1]) by webmail1.lanl.gov (8.12.11.20060308/8.12.11) with ESMTP id k3CFGZra018372; Wed, 12 Apr 2006 09:16:35 -0600 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id k3CFGZ1n018370; Wed, 12 Apr 2006 08:16:35 -0700 X-Authentication-Warning: webmail1.lanl.gov: apache set sender to herring@lanl.gov using -f Original-Received: from 128.165.123.132 (SquirrelMail authenticated user 196434); by webmail.lanl.gov with HTTP; Wed, 12 Apr 2006 08:16:35 -0700 (PDT) In-Reply-To: <86odz7ylrz.fsf@blue.stonehenge.com> Original-To: "Randal L. Schwartz" User-Agent: SquirrelMail/1.4.3a-11.EL3 X-Mailer: SquirrelMail/1.4.3a-11.EL3 X-Priority: 3 (Normal) Importance: Normal X-PMX-Version: 4.7.1.128075 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:52769 Archived-At: > Randal> (while (let ((pm (rassoc 'perl-mode interpreter-mode-alist))) > Randal> (and pm (setcdr pm 'cperl-mode)))) > > Heh. Just realized the (and ..) in there is vestigial. Nothing like > posting > code to force you to do a code-review about 20 seconds too late. How is that vestigial? If you've run out of hits, pm will be nil, but because you're still inside the let, the while can't exit. So you need to test pm, use it if it's not nil, and evaluate to nil if it is so the loop will exit. So what you have is fine, although I might recommend (let (pm) (while (setq pm (rassoc ...)) (setcdr pm ...))) Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.