summaryrefslogtreecommitdiff
path: root/etc/init.d
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2023-09-21 16:03:50 +0200
committerRicardo Wurmus <rekado@elephly.net>2023-09-24 13:49:53 +0200
commit670fc6ee50a2882fba8004de7d9d24e80459add2 (patch)
treeb5a780ca2df3f37345506841fdc9dd3ea68891f2 /etc/init.d
parent5027bc19d8a3c7bac1d89d80fc3c717ae3ec399a (diff)
etc/committer: Speed up surrounding-sexp.
The old surrounding-sexp procedure would read all S-expressions from the beginning of the file up to the given line number and then return the last encountered S-expression. This is quite wasteful. Instead we can record all lines that begin with an S-expression and jump straight to the offset closest to the desired line number to read the S-expression there. * etc/committer.scm.in (lines+offsets-with-opening-parens): New procedure. (surrounding-sexp): Use it.
Diffstat (limited to 'etc/init.d')
0 files changed, 0 insertions, 0 deletions