[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cperl-mode instead of perl-mode? (was Re: perl-mode indent bug)
From: |
Randal L. Schwartz |
Subject: |
Re: cperl-mode instead of perl-mode? (was Re: perl-mode indent bug) |
Date: |
12 Apr 2006 08:21:06 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
>>>>> "Stuart" == Stuart D Herring <address@hidden> writes:
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.
Stuart> How is that vestigial? If you've run out of hits, pm will be nil, but
Stuart> because you're still inside the let, the while can't exit. So you need
to
Stuart> test pm, use it if it's not nil, and evaluate to nil if it is so the
loop
Stuart> will exit. So what you have is fine, although I might recommend
Stuart> (let (pm)
Stuart> (while (setq pm (rassoc ...))
Stuart> (setcdr pm ...)))
It's vestigial because my brain has parts that aren't linked
to anything else.
Thanks for explaining what I probably figured out originally. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<address@hidden> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Re: cperl-mode instead of perl-mode? (was Re: perl-mode indent bug), Richard Stallman, 2006/04/12
- Re: cperl-mode instead of perl-mode? (was Re: perl-mode indent bug), Randal L. Schwartz, 2006/04/12
- Re: cperl-mode instead of perl-mode? (was Re: perl-mode indent bug), Richard Stallman, 2006/04/13
- Re: cperl-mode instead of perl-mode? (was Re: perl-mode indent bug), Randal L. Schwartz, 2006/04/13
- Re: cperl-mode instead of perl-mode?, Stefan Monnier, 2006/04/13
- Re: cperl-mode instead of perl-mode?, Richard Stallman, 2006/04/14