From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.help Subject: Re: What does the coding system nil mean? Date: Mon, 26 Jan 2004 16:20:22 +0100 Organization: http://purl.org/harder/ Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1075132052 24760 80.91.224.253 (26 Jan 2004 15:47:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 26 Jan 2004 15:47:32 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 26 16:47:26 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Al8xS-0002om-00 for ; Mon, 26 Jan 2004 16:47:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Al8hp-00081G-D6 for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Jan 2004 10:31:17 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: ^RrvqCr7c,P$zTR:QED"@h9+BTm-"fjZJJ-3=OU7.)i/K]<.J88}s>'Z_$r; List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:16372 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16372 Eli Zaretskii 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.