erlang-mode bug

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

erlang-mode bug

Luke Gorrie-3

I found a bug in erlang-mode, perhaps an elisp hacker can shed some light?

Here's a function to reproduce it:

(defun erlang-mode-bug ()
  "Causes a bug in erlang-mode.
If you open a list with '[' and then end the line with only whitespace
or comments, then there is an error when you try to move sexp-at-a-time
within the list.

This has side-effects, for example if you try to indent on the second line


Then you'll trigger this error."
  ;; insert:
  ;; [
  ;; ]
  ;; and leave the point at the start of the second line
  (insert "[\n")
  (save-excursion (insert "]"))
  ;; moving forwards- or backwards- by a sexp triggers a bogus error