From: storm@cua.dk (Kim F. Storm)
Cc: handa@m17n.org
Subject: Re: ?\_ patch
Date: 06 Feb 2003 12:48:24 +0100 [thread overview]
Message-ID: <5xadh9tyt3.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <buoof5pbwep.fsf@mcspd15.ucom.lsi.nec.co.jp>
Miles Bader <miles@lsi.nec.co.jp> 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 <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2003-02-06 11:48 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-05 20:10 ?\_ patch Edward O'Connor
2003-02-05 23:31 ` Kenichi Handa
2003-02-06 0:44 ` Luc Teirlinck
2003-02-06 1:06 ` Luc Teirlinck
2003-02-06 1:20 ` Luc Teirlinck
2003-02-06 10:04 ` Kim F. Storm
2003-02-06 9:17 ` Miles Bader
2003-02-06 11:48 ` Kim F. Storm [this message]
2003-02-06 11:37 ` Juanma Barranquero
2003-02-06 17:33 ` Luc Teirlinck
2003-02-07 2:07 ` Miles Bader
2003-02-07 2:53 ` Luc Teirlinck
2003-02-07 8:34 ` Miles Bader
2003-02-07 8:56 ` Kenichi Handa
2003-02-07 14:17 ` Kim F. Storm
2003-02-07 13:28 ` Miles Bader
2003-02-07 14:52 ` Kim F. Storm
2003-02-07 14:02 ` Miles Bader
2003-02-07 14:30 ` Dmitry Paduchikh
2003-02-07 16:07 ` Kim F. Storm
2003-02-07 15:53 ` John Paul Wallington
2003-02-07 16:50 ` Kim F. Storm
2003-02-07 16:23 ` John Paul Wallington
2003-02-08 1:44 ` Miles Bader
2003-02-09 2:07 ` Kim F. Storm
2003-02-10 1:48 ` Miles Bader
2003-02-07 16:09 ` Dmitry Paduchikh
2003-02-07 15:51 ` Kim F. Storm
2003-02-07 15:13 ` Damien Elmes
2003-02-07 20:20 ` Luc Teirlinck
2003-02-09 12:39 ` Richard Stallman
2003-02-10 10:47 ` Andreas Schwab
2003-02-07 9:18 ` Richard Stallman
2003-02-07 10:42 ` Kim F. Storm
2003-02-07 11:05 ` Andreas Schwab
2003-02-10 10:35 ` Richard Stallman
2003-02-10 12:51 ` Kim F. Storm
2003-02-11 22:25 ` Richard Stallman
2003-02-12 13:00 ` Kim F. Storm
2003-02-13 10:08 ` Richard Stallman
2003-02-13 14:19 ` Kim F. Storm
2003-02-06 1:31 ` Kenichi Handa
2003-02-06 10:40 ` Andreas Schwab
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5xadh9tyt3.fsf@kfs2.cua.dk \
--to=storm@cua.dk \
--cc=handa@m17n.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.