guile-devel
[Top][All Lists]
Advanced

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

Re: Fwd: Emacs-like file buffers


From: Kevin Ryde
Subject: Re: Fwd: Emacs-like file buffers
Date: Mon, 15 May 2006 08:34:25 +1000
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Bruce Korb <address@hidden> writes:
>
>   #ifndef REG_BASIC
>   #  define GUILE_REG_BASIC   0x10000
>   #else
>   #  define GUILE_REG_BASIC   REG_BASIC
>   #endif

Hmm.  Yes, if you're calling scm_make_regexp you need that or
something similar.  (To tell it not to force REG_EXTENDED by default.)

> P.S. one thing missing from the ice-9 regex functions seems to be a way
> to pass such flags through to the implementing libguile functions.
> Perhaps I just missed how to do it?
>
> (define (string-match pattern str . args)
>   (let ((rx (make-regexp pattern))
>         (start (if (pair? args) (car args) 0)))
>     (regexp-exec rx str start)))

Alas yes, you can't get compilation flags like regexp/newline through
with string-match.  I wanted that the other day and did

        (regexp-exec (make-regexp "..." regexp/newline) str)

Maybe string-match could separate comp flags vs exec flags among its
args, though I guess that'd depend on the two sets of constants being
distinct ...




reply via email to

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