guile-devel
[Top][All Lists]
Advanced

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

Re: Unrecognized \ sequences and Elisp


From: Neil Jerram
Subject: Re: Unrecognized \ sequences and Elisp
Date: 08 Feb 2004 19:16:42 +0000
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "Neil" == Neil Jerram <address@hidden> writes:

    Neil> Therefore I propose to reinstate \( support, but subject to the
    Neil> SCM_ENABLE_ELISP #define and a runtime read option.  I also propose to
    Neil> do the same for any other bits of Elisp read syntax that I need.
    Neil> (Currently this is [ ] for vectors and \).)  This means that to make
    Neil> \( etc. work, you'd need both to configure with --enable-elisp, and to
    Neil> set a read option using (read-enable 'escaped-parentheses).

    Neil> Does this sound OK?

In the absence of any responses, I've committed this change:

        * read.c (scm_read_opts): New opts `elisp-vectors' and
        `escaped-parens'.
        (s_vector): New.
        (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen.  Make
        handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
        `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
        Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
        `escaped-parens' option set.
        (scm_read_token): If elisp vector syntax active, disallow [ and ]
        in tokens.
        (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
        (scm_lreadparen1): New.

        * read.h: Remove conditionally compiled last arg to
        scm_lreadparen.
        (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.

Because it is declared with SCM_API, I've taken care, and introduced a
slight extra complexity, to preserve the interface of scm_lreadparen.
Is this really necessary?

        Neil





reply via email to

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