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: 06 Feb 2003 12:48:24 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <5xadh9tyt3.fsf@kfs2.cua.dk> References: <200302060044.SAA21429@eel.dms.auburn.edu> <200302060106.TAA21443@eel.dms.auburn.edu> <5xel6lu3lh.fsf@kfs2.cua.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1044528656 1560 80.91.224.249 (6 Feb 2003 10:50:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 6 Feb 2003 10:50:56 +0000 (UTC) Cc: handa@m17n.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18gjc0-0000NK-00 for ; Thu, 06 Feb 2003 11:50:32 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18gjl1-0005e3-00 for ; Thu, 06 Feb 2003 11:59:52 +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 18gjbV-0002TM-00 for emacs-devel@quimby.gnus.org; Thu, 06 Feb 2003 05:50:01 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18gjap-00029G-00 for emacs-devel@gnu.org; Thu, 06 Feb 2003 05:49:19 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18gjak-0001z4-00 for emacs-devel@gnu.org; Thu, 06 Feb 2003 05:49:15 -0500 Original-Received: from mail.filanet.dk ([195.215.206.179]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18gjaj-0001u2-00; Thu, 06 Feb 2003 05:49:13 -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 DBC437C018; Thu, 6 Feb 2003 11:49:11 +0100 (CET) Original-To: Miles Bader In-Reply-To: Original-Lines: 60 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-cc: Luc Teirlinck 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:11415 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11415 Miles Bader writes: > storm@cua.dk (Kim F. Storm) writes: > > What about ?\SPC > > Only if ?\RET, ?\TAB, etc. work too (otherwise it's just too > inconsistent -- if ?\SPC worked then people would quite naturally expect > things like ?\RET or ?\TAB to work as well). I agree, so I redraw my proposal! Thinking about it, ?\s is a good choice after all! As Luc points out, we can introduce the \s for space without any risk of breaking existing code, since the only valid syntax for using \s is when it is followed by a -, and \s-... doesn't even work in strings. So I suggest that ?\s is a space unless the `s' is immediately followed by `-' (e.g. ?\s-a) in which case it has the usual meaning as a super modifier. In strings, "\s" should also mean a space unless it is following by a `-' (as in "\s-a") which should produce an error as it does now. To follow a space with a `-' in a string use " -" as before, or "\s\-". The following patch does this: Index: lread.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/lread.c,v retrieving revision 1.305 diff -c -r1.305 lread.c *** lread.c 4 Feb 2003 14:03:12 -0000 1.305 --- lread.c 6 Feb 2003 10:37:54 -0000 *************** *** 1698,1705 **** case 's': c = READCHAR; ! if (c != '-') ! error ("Invalid escape character syntax"); c = READCHAR; if (c == '\\') c = read_escape (readcharfun, 0, byterep); --- 1698,1707 ---- case 's': c = READCHAR; ! if (c != '-') { ! UNREAD (c); ! return ' '; ! } c = READCHAR; if (c == '\\') c = read_escape (readcharfun, 0, byterep); -- Kim F. Storm http://www.cua.dk