[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What does the coding system nil mean?
From: |
Jesper Harder |
Subject: |
Re: What does the coding system nil mean? |
Date: |
Mon, 26 Jan 2004 16:20:22 +0100 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) |
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.
- What does the coding system nil mean?, Jesper Harder, 2004/01/24
- Re: What does the coding system nil mean?, Eli Zaretskii, 2004/01/25
- Message not available
- Re: What does the coding system nil mean?, Jesper Harder, 2004/01/25
- Re: What does the coding system nil mean?, Eli Zaretskii, 2004/01/26
- Message not available
- Re: What does the coding system nil mean?, Stefan Monnier, 2004/01/26
- Re: What does the coding system nil mean?, Eli Zaretskii, 2004/01/26
- Re: What does the coding system nil mean?, Oliver Scholz, 2004/01/27
- Re: What does the coding system nil mean?, Stefan Monnier, 2004/01/27
- Message not available
- Re: What does the coding system nil mean?,
Jesper Harder <=
- Re: What does the coding system nil mean?, Eli Zaretskii, 2004/01/26
- Re: What does the coding system nil mean?, Oliver Scholz, 2004/01/27