unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stuart D. Herring" <herring@lanl.gov>
Cc: emacs-devel@gnu.org
Subject: Re: cperl-mode instead of perl-mode? (was Re: perl-mode indent bug)
Date: Wed, 12 Apr 2006 08:16:35 -0700 (PDT)	[thread overview]
Message-ID: <40741.128.165.123.132.1144854995.squirrel@webmail.lanl.gov> (raw)
In-Reply-To: <86odz7ylrz.fsf@blue.stonehenge.com>

> 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.

  reply	other threads:[~2006-04-12 15:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-12  3:44 perl-mode indent bug Karl Chen
2006-04-12  5:11 ` Stefan Monnier
2006-04-12 12:42 ` cperl-mode instead of perl-mode? (was Re: perl-mode indent bug) Randal L. Schwartz
2006-04-12 13:18   ` Randal L. Schwartz
2006-04-12 15:16     ` Stuart D. Herring [this message]
2006-04-12 15:21       ` Randal L. Schwartz
2006-04-12 14:44   ` cperl-mode instead of perl-mode? Stefan Monnier
2006-04-13 18:51     ` Ted Zlatanov
2006-04-14 16:15       ` Richard Stallman
2006-04-18 14:56         ` Ted Zlatanov
2006-04-12 21:46   ` cperl-mode instead of perl-mode? (was Re: perl-mode indent bug) Richard Stallman
2006-04-12 21:58     ` Randal L. Schwartz
2006-04-13 16:38       ` Richard Stallman
2006-04-13 17:08         ` Randal L. Schwartz
2006-04-13 17:10         ` cperl-mode instead of perl-mode? Stefan Monnier
2006-04-14 16:15           ` Richard Stallman
2006-04-14 20:35             ` Stefan Monnier
2006-04-15  0:27               ` Randal L. Schwartz
2006-04-15  1:37                 ` Stefan Monnier
2006-04-16  2:09                   ` Richard Stallman
2006-04-15 17:32               ` Richard Stallman
2006-04-15 11:45   ` Piet van Oostrum
2006-04-15 13:36     ` Randal L. Schwartz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40741.128.165.123.132.1144854995.squirrel@webmail.lanl.gov \
    --to=herring@lanl.gov \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).