From: Wes Hardaker <wes@hardakers.net>
Cc: ding@gnus.org
Subject: Re: bad fixes to a higher level problem
Date: Thu, 30 Dec 2004 22:11:02 -0800 [thread overview]
Message-ID: <sd7jmz9evd.fsf@wes.hardakers.net> (raw)
In-Reply-To: <wky8ffsbrj.fsf@yahoo.fr> (drkm's message of "Thu, 30 Dec 2004 22:43:12 +0100")
>>>>> On Thu, 30 Dec 2004 22:43:12 +0100, drkm <darkman_spam@yahoo.fr> said:
>> (while (and (not (eobp))
>> - (< level (gnus-summary-thread-level)))
>> + (setq thlevel (gnus-summary-thread-level))
>> + (< level thlevel))
drkm> Why introduce `thlevel' if you don't use it ? Are there other
drkm> reference to this variable, not shown in the patch ?
Welcome to confusing elisp 101. Elisp is naturally obfuscated,
fortunately, so I don't have to work hard to make it that way.
The (setq thlevel) exists within the and statement, which means the
results of the setq is evaluated before the < operation is called. It
was the < operation that was causing problems with a nil argument. I
had 2 choices: use a temporary variable to store the results (thlevel)
or call (gnus-summary-thread-level) twice, once in the and to check
that it was !nil and once in the <. I suppose, actually, it would
have been better to do something like:
(< level (or (gnus-summary-thread-level) 0))
That would have dropped the need for the temp var.
--
"In the bathtub of history the truth is harder to hold than the soap,
and much more difficult to find." -- Terry Pratchett
next prev parent reply other threads:[~2004-12-31 6:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-30 20:39 Wes Hardaker
2004-12-30 21:43 ` drkm
2004-12-31 6:11 ` Wes Hardaker [this message]
2004-12-31 6:33 ` drkm
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sd7jmz9evd.fsf@wes.hardakers.net \
--to=wes@hardakers.net \
--cc=ding@gnus.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.
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 NNTP newsgroup(s).