Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in scala-mode #53

Closed
wedens opened this issue May 29, 2020 · 3 comments
Closed

Error in scala-mode #53

wedens opened this issue May 29, 2020 · 3 comments

Comments

@wedens
Copy link

wedens commented May 29, 2020

When I open some scala file that contains "TODO", I get this error:

Debugger entered--Lisp error: (args-out-of-range 0 21)
  remove-list-of-text-properties(0 21 (display face font-lock-multiline))
  font-lock-default-unfontify-region(0 21)
  font-lock-unfontify-region(0 21)
  font-lock-default-fontify-region(0 2 nil)
  font-lock-fontify-region(0 2 nil)
  hl-todo-mode()
  run-hooks(change-major-mode-after-body-hook prog-mode-hook scala-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook prog-mode-hook scala-mode-hook))
  run-mode-hooks(scala-mode-hook)
  scala-mode()

If I reopen the same file, it opens without any errors.

I can reproduce it with .scala file that contains just new RuntimeException("TODO") // TODO line

@tarsius
Copy link
Owner

tarsius commented May 29, 2020

I cannot reproduce that. Did you try reproducing it starting from emacs -Q?

@wedens
Copy link
Author

wedens commented May 30, 2020

It doesn't happen every time the file is opened. I may need to reopen the file or restart emacs several times to reproduce the issue.

Did you try reproducing it starting from emacs -Q?

No. I've tried to reproduce it with as much of my configuration disabled as possible and the error still occurs.

@tarsius
Copy link
Owner

tarsius commented May 31, 2020

This might be an issue in your setup (including additional packages), or it might be an issue with scala-mode. It might also be a hl-todo issue, but that is much less likely.

I am closing this. You probably have no choice but to really start from emacs -Q. If you provide more information, then I might be able to help but as it stands I would have to resort to guessing.

Here's a guess: We just had a similar issue with tex-mode: #52. Something in your setup might make the same mistake and the fix might be similar as well.

@tarsius tarsius closed this as completed May 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants