hvesalai / emacs-scala-mode

The definitive scala-mode for emacs
http://ensime.org
GNU General Public License v3.0
362 stars 68 forks source link

`**` at end of multiline comment cause issue #140

Closed martin-liu closed 6 years ago

martin-liu commented 7 years ago

Hi,

I found a bug that when there's 2 star(**) at the end of multiline comment, it will treat all code below it as comment. See detail below:

With **: image

With *: image

hvesalai commented 7 years ago

Cannot repro. Please see that you are using the latest version of the mode

image

martin-liu commented 7 years ago

@hvesalai It's weird that you don't see the issue.

I checked the version is scala-mode-20170531.44.

Also I tried to add **/ in https://github.com/ensime/emacs-scala-mode/blob/master/scala-mode-syntax.el#L611 image

Then it works for me, see image

Since this function is not regexp match, it will have issue if I use more than 2 stars like /*** or ***/

image

fommil commented 7 years ago

Maybe Emacs version?

martin-liu commented 7 years ago

@fommil my emacs version is: image

hvesalai commented 7 years ago

Ok. My bad, I'm not using the latest version. @VlachJosef can you see if your latest change broke this.

VlachJosef commented 7 years ago

yes, this is broken due to how scala-syntax:propertize-special-symbols is looking for special symbols.

Currently it is using:

(member match '("/*" "//" "/**" "</" "*/"))

to eliminate some cases, but it needs to be little more clever to cover all other variants. So some regexp match will be needed at this point.

martin-liu commented 7 years ago

👍 👍 👍

yyadavalli commented 6 years ago

Fixed in #141