unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* New space char syntax
@ 2003-02-14 16:47 Kai Großjohann
  2003-02-14 17:35 ` Juanma Barranquero
  0 siblings, 1 reply; 14+ messages in thread
From: Kai Großjohann @ 2003-02-14 16:47 UTC (permalink / raw)


I tried to byte-compile the current CVS Oort Gnus with the current CVS
Emacs.  It barfed at the "? " in the source code of Gnus.  I've done
a mass-replacing and wrote "?\s" but that doesn't appear to be the
right solution: people with older Emacsen should still be able to use
Oort Gnus.

Is the message just a warning or an error?  (I didn't want to take
chances.)

If it is an error, WIBNI Emacs also accepted the old-style syntax,
warts and all?
-- 
A turnip curses Elvis

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New space char syntax
  2003-02-14 16:47 New space char syntax Kai Großjohann
@ 2003-02-14 17:35 ` Juanma Barranquero
  2003-02-14 20:36   ` Kai Großjohann
  0 siblings, 1 reply; 14+ messages in thread
From: Juanma Barranquero @ 2003-02-14 17:35 UTC (permalink / raw)
  Cc: emacs-devel

On Fri, 14 Feb 2003 17:47:32 +0100, kai.grossjohann@uni-duisburg.de (Kai Großjohann) wrote:

> I tried to byte-compile the current CVS Oort Gnus with the current CVS
> Emacs.  It barfed at the "? " in the source code of Gnus.

Did it barf at every use of "? " or just "? " followed by a digit or
symbol character?

For example, now:

ELISP> (list ? 1)
*** Read error ***  Invalid read syntax: "?"
ELISP> (list ?  1)
(32 1)

ELISP> (list ? ())
(32 nil)


                                                           /L/e/k/t/u

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New space char syntax
  2003-02-14 17:35 ` Juanma Barranquero
@ 2003-02-14 20:36   ` Kai Großjohann
  2003-02-14 23:59     ` Juanma Barranquero
  0 siblings, 1 reply; 14+ messages in thread
From: Kai Großjohann @ 2003-02-14 20:36 UTC (permalink / raw)


Juanma Barranquero <lektu@terra.es> writes:

> On Fri, 14 Feb 2003 17:47:32 +0100, kai.grossjohann@uni-duisburg.de (Kai Großjohann) wrote:
>
>> I tried to byte-compile the current CVS Oort Gnus with the current CVS
>> Emacs.  It barfed at the "? " in the source code of Gnus.
>
> Did it barf at every use of "? " or just "? " followed by a digit or
> symbol character?

Difficult to say.  I just changed all of them.  But maybe I should go
back and just change things like (? ?a).  I saw these in the Gnus
source code.
-- 
A turnip curses Elvis

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New space char syntax
  2003-02-14 20:36   ` Kai Großjohann
@ 2003-02-14 23:59     ` Juanma Barranquero
  2003-02-15 16:50       ` Kim F. Storm
  2003-02-15 19:10       ` Richard Stallman
  0 siblings, 2 replies; 14+ messages in thread
From: Juanma Barranquero @ 2003-02-14 23:59 UTC (permalink / raw)
  Cc: emacs-devel


On Fri, 14 Feb 2003 21:36:42 +0100
kai.grossjohann@uni-duisburg.de (Kai Großjohann) wrote:

> Difficult to say.  I just changed all of them.  But maybe I should go
> back and just change things like (? ?a).

I think so. It shouldn't be necessary to make any incompatible changes,
just fixing broken usages, like "? ?a" to "?  ?a", "?C-g" to "?\C-g",
things like that.

-- 
Juanma Barranquero <lektu@terra.es>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New space char syntax
  2003-02-14 23:59     ` Juanma Barranquero
@ 2003-02-15 16:50       ` Kim F. Storm
  2003-02-15 17:51         ` Kai Großjohann
  2003-02-15 20:44         ` Juanma Barranquero
  2003-02-15 19:10       ` Richard Stallman
  1 sibling, 2 replies; 14+ messages in thread
From: Kim F. Storm @ 2003-02-15 16:50 UTC (permalink / raw)
  Cc: Kai Großjohann

Juanma Barranquero <lektu@terra.es> writes:

> On Fri, 14 Feb 2003 21:36:42 +0100
> kai.grossjohann@uni-duisburg.de (Kai Großjohann) wrote:
> 
> > Difficult to say.  I just changed all of them.  But maybe I should go
> > back and just change things like (? ?a).
> 
> I think so. It shouldn't be necessary to make any incompatible changes,
> just fixing broken usages, like "? ?a" to "?  ?a", "?C-g" to "?\C-g",
> things like that.

Please note that '(? ?a) is still valid syntax.  

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New space char syntax
  2003-02-15 16:50       ` Kim F. Storm
@ 2003-02-15 17:51         ` Kai Großjohann
  2003-02-15 20:44         ` Juanma Barranquero
  1 sibling, 0 replies; 14+ messages in thread
From: Kai Großjohann @ 2003-02-15 17:51 UTC (permalink / raw)


storm@cua.dk (Kim F. Storm) writes:

> Juanma Barranquero <lektu@terra.es> writes:
>
>> On Fri, 14 Feb 2003 21:36:42 +0100
>> kai.grossjohann@uni-duisburg.de (Kai Großjohann) wrote:
>> 
>> > Difficult to say.  I just changed all of them.  But maybe I should go
>> > back and just change things like (? ?a).
>> 
>> I think so. It shouldn't be necessary to make any incompatible changes,
>> just fixing broken usages, like "? ?a" to "?  ?a", "?C-g" to "?\C-g",
>> things like that.
>
> Please note that '(? ?a) is still valid syntax.  

Somebody else made a change in one spot in Gnus, and now it seems to
compile.  So it was just me being over-eager to change stuff.
-- 
A turnip curses Elvis

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New space char syntax
  2003-02-14 23:59     ` Juanma Barranquero
  2003-02-15 16:50       ` Kim F. Storm
@ 2003-02-15 19:10       ` Richard Stallman
  1 sibling, 0 replies; 14+ messages in thread
From: Richard Stallman @ 2003-02-15 19:10 UTC (permalink / raw)
  Cc: kai.grossjohann

    > Difficult to say.  I just changed all of them.  But maybe I should go
    > back and just change things like (? ?a).

(? ?a) is still valid.  The case that is not valid is (? a)
or (?ab).

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New space char syntax
  2003-02-15 16:50       ` Kim F. Storm
  2003-02-15 17:51         ` Kai Großjohann
@ 2003-02-15 20:44         ` Juanma Barranquero
  2003-02-17  7:19           ` Richard Stallman
  1 sibling, 1 reply; 14+ messages in thread
From: Juanma Barranquero @ 2003-02-15 20:44 UTC (permalink / raw)
  Cc: Kai Großjohann


On 15 Feb 2003 17:50:57 +0100
storm@cua.dk (Kim F. Storm) wrote:

> Please note that '(? ?a) is still valid syntax.  

Yes. Sloppy wording. I meant things like '(? . ?a)


-- 
Juanma Barranquero <lektu@terra.es>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New space char syntax
  2003-02-15 20:44         ` Juanma Barranquero
@ 2003-02-17  7:19           ` Richard Stallman
  2003-02-17  7:49             ` Juanma Barranquero
  2003-02-17 10:59             ` Kim F. Storm
  0 siblings, 2 replies; 14+ messages in thread
From: Richard Stallman @ 2003-02-17  7:19 UTC (permalink / raw)
  Cc: storm

    Yes. Sloppy wording. I meant things like '(? . ?a)

That case is also still valid.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New space char syntax
  2003-02-17  7:19           ` Richard Stallman
@ 2003-02-17  7:49             ` Juanma Barranquero
  2003-02-17 20:37               ` Richard Stallman
  2003-02-17 10:59             ` Kim F. Storm
  1 sibling, 1 reply; 14+ messages in thread
From: Juanma Barranquero @ 2003-02-17  7:49 UTC (permalink / raw)
  Cc: storm

On Mon, 17 Feb 2003 02:19:47 -0500, Richard Stallman <rms@gnu.org> wrote:

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

ELISP> '(? . ?a)
*** Read error ***  Invalid read syntax: "?"
ELISP> '(?  . ?a)
(32 . 97)

                                                           /L/e/k/t/u

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New space char syntax
  2003-02-17  7:19           ` Richard Stallman
  2003-02-17  7:49             ` Juanma Barranquero
@ 2003-02-17 10:59             ` Kim F. Storm
  2003-02-17 20:37               ` Richard Stallman
  1 sibling, 1 reply; 14+ messages in thread
From: Kim F. Storm @ 2003-02-17 10:59 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> 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 <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New space char syntax
  2003-02-17  7:49             ` Juanma Barranquero
@ 2003-02-17 20:37               ` Richard Stallman
  0 siblings, 0 replies; 14+ messages in thread
From: Richard Stallman @ 2003-02-17 20:37 UTC (permalink / raw)
  Cc: storm

    > That case is also still valid.

    ELISP> '(? . ?a)
    *** Read error ***  Invalid read syntax: "?"

Strange, I tried that and it seemed to still work.
Maybe I tried it in the wrong Emacs.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New space char syntax
  2003-02-17 10:59             ` Kim F. Storm
@ 2003-02-17 20:37               ` Richard Stallman
  2003-02-17 23:48                 ` Kim F. Storm
  0 siblings, 1 reply; 14+ messages in thread
From: Richard Stallman @ 2003-02-17 20:37 UTC (permalink / raw)
  Cc: emacs-devel

    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:

This complication makes the question tricky; neither alternative
is entirely right.

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

I don't think so.  I think . should be allowed after the character
constant if it is a dotted-pair dot, but not if it starts a symbol.

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

Yike, this is horrible.

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

Those cases are simply bugs.  Thanks for identifying them.

    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.

It seems logical to handle them like singlequote.

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

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

I agree.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New space char syntax
  2003-02-17 20:37               ` Richard Stallman
@ 2003-02-17 23:48                 ` Kim F. Storm
  0 siblings, 0 replies; 14+ messages in thread
From: Kim F. Storm @ 2003-02-17 23:48 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

>     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:
> 
> This complication makes the question tricky; neither alternative
> is entirely right.
> 
>     I can change it so that '(?a. ?b) is allowed,
>     but then shouldn't '(?a.?b) be legal too?
> 
> I don't think so.  I think . should be allowed after the character
> constant if it is a dotted-pair dot, but not if it starts a symbol.

Fixed.  

I changed the syntax to allow a character constant after a dotted-pair
dot, so actually '(?a.?b) does work.  I don't see why it shouldn't be
so.


> 
>     I suggest to handle `;', `#', `[', and `?' as special
>     characters when following a `.' just like `whitespace',
>     `quote', `(' and `"' are today.
> 
> Those cases are simply bugs.  Thanks for identifying them.

Fixed.

Actually, I found that "," was always recognized after a dotted-pair dot,
even when not inside a backquote; I fixed that too.

> 
>     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.
> 
> It seems logical to handle them like singlequote.

Done.

> 
>     Also, if we fix that for symbols, the "`" and "," should be allowed
>     after a character constant too, e.g.
> 
> 	    `(?a,xx)
> 	    '(?a`(b,c))
> 
> I agree.

Done.

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2003-02-17 23:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-14 16:47 New space char syntax Kai Großjohann
2003-02-14 17:35 ` Juanma Barranquero
2003-02-14 20:36   ` Kai Großjohann
2003-02-14 23:59     ` Juanma Barranquero
2003-02-15 16:50       ` Kim F. Storm
2003-02-15 17:51         ` Kai Großjohann
2003-02-15 20:44         ` Juanma Barranquero
2003-02-17  7:19           ` Richard Stallman
2003-02-17  7:49             ` Juanma Barranquero
2003-02-17 20:37               ` Richard Stallman
2003-02-17 10:59             ` Kim F. Storm
2003-02-17 20:37               ` Richard Stallman
2003-02-17 23:48                 ` Kim F. Storm
2003-02-15 19:10       ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).