bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#25529: diagnosis and one approach to a fix


From: Tom Tromey
Subject: bug#25529: diagnosis and one approach to a fix
Date: Fri, 10 Feb 2017 21:06:20 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.91 (gnu/linux)

>>>>> "Stefan" == Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> -(defun js-syntax-propertize-regexp (end)
>> +(defun js-syntax-propertize-regexp ()

Stefan> Removing the `end` argument is fundamentally wrong.  It's OK to play it
Stefan> fast-and-loose and ignore that argument, but the function *should* keep
Stefan> the buffer untouched after `end`.

I thought it was ok because the region is always extended to the end of
the line, and I think this regexp can't span lines.

>> +        (put-text-property (match-beginning 1) (match-end 1)
Stefan>                                                   ^^^^^^^^^^^^^
Stefan>                                               (min end (match-end 1))
Stefan> should do it.

If this change is still needed, should the final goto-char also be
treated this way?

Tom





reply via email to

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