emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New space char syntax


From: Kim F. Storm
Subject: Re: New space char syntax
Date: 17 Feb 2003 11:59:58 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Richard Stallman <address@hidden> writes:

>     Yes. Sloppy wording. I meant things like '(? . ?a)
> 
> That case is also still valid.

Actually it isn't; I deliberately excluded `.' from the list of legal
symbols which may immediately follow a character constant, since it
is a legal symbol character, e.g:

        '(.a bc. d) => (\.a bc\. d)
        '(.?a) => (\.\?a)
        '(a.?a) => (a\.\?a)

I can change it so that '(?a. ?b) is allowed,
but then shouldn't '(?a.?b) be legal too?

There's really no risk of confusion here (that syntax
was illegal before), so I think we should do it.

The parsing of the `.' token and lisp symbols is pretty obscure.
Consider these examples:

        '(ab .; comment
        de )  => (ab \. de)

        '(ab . ; comment
        de )  => (ab . de)

        '(ab .#'cd) => (ab \. (function cd))
        '(ab . #'cd) => (ab function cd)

        '(ab .'cd)  => (ab quote cd)

        '(ab .(c d)) => (ab c d)

        '(ab .[c d]) => (a b \. [c d])
        '(ab . [c d]) => (a b . [c d])

        '(ab ."xyz") => (ab . "xyz")

        '(ab .?c) => (ab \.\?c)
        '(ab . ?c) => (ab . 99)

I suggest to handle `;', `#', `[', and `?' as special
characters when following a `.' just like `whitespace',
`quote', `(' and `"' are today.

Finally, in a symbol, "`" and "," are not recognized as special 
either, e.g.

        '(a`b,c) => (a\`b\,c)
        '(a`(b,c)) => (a\` (b\,c))

I think the last example shows that they should be recognized.


Also, if we fix that for symbols, the "`" and "," should be allowed
after a character constant too, e.g.

        `(?a,xx)
        '(?a`(b,c))

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]