From: Jesper Harder <harder@myrealbox.com>
Subject: Re: What does the coding system nil mean?
Date: Mon, 26 Jan 2004 16:20:22 +0100 [thread overview]
Message-ID: <m31xpmlosp.fsf@defun.localdomain> (raw)
In-Reply-To: mailman.1343.1075097239.928.help-gnu-emacs@gnu.org
Eli Zaretskii <eliz@elta.co.il> writes:
>> Then nil isn't really a coding system, but just a value that some
>> coding system related functions happen to interpret in a certain way.
>
> It's a coding system in the sense that every primitive that accepts
> a coding system symbol also accepts nil.
But it's not transparent, i.e. some functions behave differently if
you use nil rather than a real coding system. For example
(progn
(setq last-coding-system-used 'none-such)
(encode-coding-string "foo" nil)
last-coding-system-used)
=> none-such
If nil was a real coding system, the value of
`last-coding-system-used' would have been changed. There are also
other cases, where you can tell that nil is not a coding system.
>> Though, I think it's a bit odd for a predicate called
>> `coding-system-p' to return t for an object that is _not_ in fact a
>> coding system.
>
> IMHO, it's no more odd than this:
>
> M-: (listp nil) RET => t
I would find it a lot more odd if (listp ()) did not return t -- nil
is the empty list, after all.
next prev parent reply other threads:[~2004-01-26 15:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-24 22:13 What does the coding system nil mean? Jesper Harder
2004-01-25 6:10 ` Eli Zaretskii
[not found] ` <mailman.1298.1075010993.928.help-gnu-emacs@gnu.org>
2004-01-25 21:09 ` Jesper Harder
2004-01-26 6:08 ` Eli Zaretskii
[not found] ` <mailman.1343.1075097239.928.help-gnu-emacs@gnu.org>
2004-01-26 15:07 ` Stefan Monnier
2004-01-26 17:28 ` Eli Zaretskii
2004-01-27 15:22 ` Oliver Scholz
2004-01-27 16:33 ` Stefan Monnier
2004-01-26 15:20 ` Jesper Harder [this message]
2004-01-26 17:26 ` Eli Zaretskii
2004-01-27 14:44 ` Oliver Scholz
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=m31xpmlosp.fsf@defun.localdomain \
--to=harder@myrealbox.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).