mooz / js2-mode

Improved JavaScript editing mode for GNU Emacs
GNU General Public License v3.0
1.33k stars 186 forks source link

parse-partial-sexp expects args TO greater than FROM since Emacs 28.1 #571

Closed jacott closed 3 years ago

jacott commented 3 years ago

Affects js2-mode-forward-sexp

from emacs news:


** 'parse-partial-sexp' now signals an error if TO is smaller than FROM. Previously this would lead to the function interpreting FROM as TO and vice versa, which would be confusing when passing in OLDSTATE, which refers to the old state at FROM.

dgutov commented 3 years ago

When called with a negative argument, right?

dgutov commented 3 years ago

Fixed the scenario which I could reproduce. If you still see related problems, please post a step-by-step repro.

jacott commented 3 years ago

When called with a negative argument, right?

Yes, like when calling backward-up-list

I can confirm that b913961e410dbfdc52a80d62eb4cfe7a305b4e3e fixes the problem for me