[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: |
Sat, 11 Feb 2017 08:27:04 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.91 (gnu/linux) |
>> 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.
Stefan> Why come up with complex semantic arguments when a simple `max` ensures
Stefan> the right behavior regardless of other assumptions?
I had already done it, so inertia.
I'm making the change, but I think the fix has to look like this:
(when (and (looking-at js--syntax-propertize-regexp-regexp)
;; Don't touch text after END.
(<= (match-end 1) end))
(put-text-property (match-beginning 1) (match-end 1)
'syntax-table (string-to-syntax "\"/"))
(goto-char (match-end 0))))))
... the reason being, in the new regexp match #1 is just the terminating
"/", which is the only character whose syntax we want to modify here.
Let me know what you think.
Tom
- bug#25529: diagnosis and one approach to a fix, (continued)
- bug#25529: diagnosis and one approach to a fix, Dmitry Gutov, 2017/02/05
- bug#25529: diagnosis and one approach to a fix, Tom Tromey, 2017/02/06
- bug#25529: diagnosis and one approach to a fix, Dmitry Gutov, 2017/02/06
- bug#25529: diagnosis and one approach to a fix, Tom Tromey, 2017/02/07
- bug#25529: diagnosis and one approach to a fix, Dmitry Gutov, 2017/02/07
- bug#25529: diagnosis and one approach to a fix, Stefan Monnier, 2017/02/07
- bug#25529: diagnosis and one approach to a fix, Tom Tromey, 2017/02/10
- bug#25529: diagnosis and one approach to a fix, Stefan Monnier, 2017/02/10
- bug#25529: diagnosis and one approach to a fix, Tom Tromey, 2017/02/10
- bug#25529: diagnosis and one approach to a fix, Stefan Monnier, 2017/02/10
- bug#25529: diagnosis and one approach to a fix,
Tom Tromey <=
- bug#25529: diagnosis and one approach to a fix, Stefan Monnier, 2017/02/11
- bug#25529: diagnosis and one approach to a fix, Tom Tromey, 2017/02/11
- bug#25529: diagnosis and one approach to a fix, Dmitry Gutov, 2017/02/11