Re: [GSOC][PATCH] userdiff: add support for Scheme
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Mar 29, 2021, 10:48 UTC
- Message-ID
- <71c34328-9814-2777-3a9d-f908602dd36f@kdbg.org>
- In-Reply-To
- <09678471-b2a2-8504-2293-e2b34a3a96e8@gmail.com>
Am 29.03.21 um 12:18 schrieb Phillip Wood:
Show 14 quoted lines
> It would be nice to include indented define forms but including them > means that any change to the body of a function is attributed to the > last internal definition rather than the actual function. For example > > (define (f arg) > (define (g x) > (+ 1 x)) > > (some-func ...) > ;;any change here will have '(define (g x)' in the hunk header, not > '(define (f arg)' > > I don't think this can be avoided as we rely on regexs rather than > parsing the source so it is probably best to only match toplevel defines.
There can be two rules, one that matches '(define-' that is indented, and another one that matches all non-indented forms of definitions. If that is what you mean.
-- Hannes