thomblake/js3-mode — pull request #56 by skumagai (2012-03-29 19:00:38+00:00)
Title: File mode specification error: (args-out-of-range 0 1) on a new file/buffer

A call to js3-reparse causes this error on a new file/buffer. Upon inspection, this error is originated from `(buffer-string-no-properties 1 (buffer-size))` in `js3-do-parse`, as `(buffer-size)` of an empty buffer is 0.

Because there is nothing to parse in this case, I worked around this problem by not calling `(js3-reparse)` inside `js3-mode` when opening an empty file/buffer.