tbm / test

0 stars 0 forks source link

Emacs: Using syntax tables for strings fails on long strings #69

Closed tbm closed 9 years ago

tbm commented 9 years ago

Original report by Martin Blais (Bitbucket: blais, GitHub: blais).


There's a bug: loading the file, with a long multiline string, the string SOMETIMES does not end. Open the file in attachment, for example, you'll see that after the long string that contains "Estimated Total Taxes Paid" it's all pink all the way to the EOF.

tbm commented 9 years ago

Original comment by Martin Blais (Bitbucket: blais, GitHub: blais).


For: monnier@iro.umontreal.ca

tbm commented 9 years ago

Original comment by monnier (Bitbucket: monnier, GitHub: monnier).


Thanks for test2.beancount. Indeed I forgot that the underlying major mode might have set syntax-begin-function. The attached patch should fix it.

tbm commented 9 years ago

Original comment by Martin Blais (Bitbucket: blais, GitHub: blais).


Applied patch fix for beancount.el, but no cigar. See issue 69.

tbm commented 9 years ago

Original comment by Martin Blais (Bitbucket: blais, GitHub: blais).


Patch applied, still no cigar. Doesn't fix the problem.

tbm commented 9 years ago

Original comment by monnier (Bitbucket: monnier, GitHub: monnier).


Duh! I really hate syntax-begin-function! Can't believe that I introduced it in the first place! Anyway, this extra patch seems to take of it also with Emacs-23 and Emacs-24 (rather than only with my local Emacs which has some hacks I'd forgotten, that partly neuter syntax-begin-function).

tbm commented 9 years ago

Original comment by Martin Blais (Bitbucket: blais, GitHub: blais).


Is your patch to remove those three lines? I can't apply on latest. So I tried applying on the previous.

In both cases, it fails on emacs 23, 24.4, 24.5, and 25. Still not working.

tbm commented 9 years ago

Original comment by monnier (Bitbucket: monnier, GitHub: monnier).


Hmm... not sure how, but I ended up attaching the wrong patch. I hope this time I get it right.

tbm commented 9 years ago

Original comment by Martin Blais (Bitbucket: blais, GitHub: blais).


Fixed #69: Correct syntax highlighting, thanks to Stefan Monnier.

tbm commented 9 years ago

Original comment by Martin Blais (Bitbucket: blais, GitHub: blais).


This works!