From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: ?\_ patch Date: 07 Feb 2003 16:51:01 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <5xadh8hyxm.fsf@kfs2.cua.dk> References: <5xadh9tyt3.fsf@kfs2.cua.dk> <200302061733.LAA24096@eel.dms.auburn.edu> <200302070253.UAA25703@eel.dms.auburn.edu> <200302070856.RAA00661@etlken.m17n.org> <5xk7gci39e.fsf@kfs2.cua.dk> <20030207132847.GA5105@gnu.org> <5xfzr0i1nx.fsf@kfs2.cua.dk> <20030207140204.GA6530@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1044629656 21530 80.91.224.249 (7 Feb 2003 14:54:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 7 Feb 2003 14:54:16 +0000 (UTC) Cc: Kenichi Handa Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18h9tO-0005b5-00 for ; Fri, 07 Feb 2003 15:54:14 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18hA2y-0005Hd-00 for ; Fri, 07 Feb 2003 16:04:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18h9sy-0002U9-01 for emacs-devel@quimby.gnus.org; Fri, 07 Feb 2003 09:53:48 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18h9sh-0002Te-00 for emacs-devel@gnu.org; Fri, 07 Feb 2003 09:53:31 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18h9rE-0001xE-00 for emacs-devel@gnu.org; Fri, 07 Feb 2003 09:52:01 -0500 Original-Received: from mail.filanet.dk ([195.215.206.179]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18h9r4-0001t1-00; Fri, 07 Feb 2003 09:51:50 -0500 Original-Received: from kfs2.cua.dk.cua.dk (kfs2.local.filanet.dk [192.168.1.182]) by mail.filanet.dk (Postfix) with SMTP id 407D57C012; Fri, 7 Feb 2003 15:51:49 +0100 (CET) Original-To: Miles Bader In-Reply-To: <20030207140204.GA6530@gnu.org> Original-Lines: 56 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-cc: teirllm@dms.auburn.edu Original-cc: ted@oconnor.cx Original-cc: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:11464 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11464 Miles Bader writes: > On Fri, Feb 07, 2003 at 03:52:02PM +0100, Kim F. Storm wrote: > > > Because #\SPC is actually pretty self-explanatory whereas ?\s isn't. > > > > IMO, \s is just as self-explanatory as \t, \n, and \r. > > The latter are `self-explanatory' only because they're used in C, and so are > very familar to programmers. \s is not. The Lisp manual doesn't refer to C syntax to explain e.g. ?\t. So to me, \s and \t are equally self-explanatory. On the other hand, I don't find #\SPC self-explanatory (but ?\SPC is). > > > > I thought about that too, but I think #\SPC is better, because the `\' > > > leaves a bit of whitespace between itself and the following character so > > > the `SPC' stands out quite distinctly. `?' on the other isn't visually > > > distinct, so #?SPC looks like a bit of a muddle. > > > > Then what about simply using ?SPC, ?TAB, etc. > > No, you're missing the point. My object to `?' is that the `?' is not > visually distinct from the `S' -- they tend to `run into' each other. > `\', on the other hand has a bunch of whitespace on the right side of it's > glyph, and so is much more visually distinct from the following character. Ok, I agree. However, I still think it is best to keep the ? as part of the read syntax for a character, i.e. I prefer ?\SPC to #\SPC as the ?\ prefix clearly identifies this as a character, e.g. I find the use of ? in the following example more consistent than #: (memq ch '(?\SPC ?\- ?\n ?\t)) (memq ch '(#\SPC ?\- ?\n ?\t)) I just grepped for "[?][\\][A-Z][^-]" in all of lisp/ and there isn't a single occurrence. So the ?\XXX syntax should be safe. > Morever, `#' is _good_ becaues it's the general lisp syntax for special > syntax, so a lisp programmer will be much more likely to realize what's going > on (if he's unfamiliar with this particular bit of syntax) if he sees #\SPC > than if he sees ?SPC. But `?' is _much better_ than `#' here, since _any_ lisp programmer should know that this denotes a character, whereas `#' just denotes it as "special" (but there's nothing special about a space character?). I vote for ?\SPC over #\SPC. But I still think adding ?\s is the best choice; it's simple, it doesn't break anything, and it doesn't require us to introduce a completely new character syntax. -- Kim F. Storm http://www.cua.dk