[Top][All Lists]

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

Re: bug#31636: 27.0.50; lockfile syntax searchable from info manual

From: Robert Pluim
Subject: Re: bug#31636: 27.0.50; lockfile syntax searchable from info manual
Date: Wed, 06 Jun 2018 16:51:03 +0200

Noam Postavsky <address@hidden> writes:

> On 6 June 2018 at 09:51, Robert Pluim <address@hidden> wrote:
>>>> I could always do (eq (char-before) ?() I suppose.
>>> That's probably better. But wait! This time you *should* have a backslash: 
>>> ?\(
>> Thatʼs a matter of style, no? ?( works equally well, but emacs
>> convention appears to be ?\(
> Mostly yes, but see also Bug#20852.

I see the documentation changed from 'should' to 'must' as a result of
that bug. ?\( it is.

> Even worse, it will go backwards through the buffer attempting to find
> a sentence that ends at point.
> (with-temp-buffer
>   (dotimes (i 7)
>     (dotimes (_ (expt 10 i))
>       (insert "Lorem ipsum dolor sit amet, consectetur adipiscing
> elit, sed do eiusmod tempor incididunt ut labore et dolore magna
> aliqua.  Ut enim ad minim veniam, quis nostrud exercitation
> ullamco laboris nisi ut aliquip ex ea commodo consequat.  Duis
> aute irure dolor in reprehenderit in voluptate velit esse cillum
> dolore eu fugiat nulla pariatur.  Excepteur sint occaecat
> cupidatat non proident, sunt in culpa qui officia deserunt mollit
> anim id est laborum."))
>     (insert "  Sentence doesn't end here")
>     (benchmark 1 '(looking-back (sentence-end)))))
> Elapsed time: 0.000000s [3 times]
> Elapsed time: 0.023000s
> Elapsed time: 0.101000s
> Elapsed time: 0.902000s
> Elapsed time: 8.872000s

OK. Looks like my mental model of 'looking-back' was wrong. Iʼll add
the limit.


reply via email to

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