mwarrenus / js2-mode

Automatically exported from code.google.com/p/js2-mode
0 stars 0 forks source link

forward-sexp not working properly #107

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Put the following in a buffer:
var viewPanel = new Ext.Panel({
    frame:true,
    title: 'Search',
    items: [fooPanel, taskActions]
});

2. Put the cursor on the left curly brace (or the left square bracket).
3. M-x forward-sexp RET

What is the expected output? What do you see instead?
Not "output", but I expect to see the cursor move to the matching bracket.
 Instead, it moves past the semicolon.

What version of the product are you using? On what operating system?
js2-20090723b.el in Emacs 22.31 on Windows XP.

Please provide any additional information below.
The code I'm working with has a lot of these structures, several levels
deep, and I use forward-sexp frequently, both for navigation and to be sure
I've got the nesting right. This flaw is keeping me from moving to js2 mode.

Note: this is important enough to me that I'm willing to take a stab at
fixing it, if you can provide a bit of guidance.

Original issue reported on code.google.com by Woollywh...@gmail.com on 29 Jul 2009 at 10:50

GoogleCodeExporter commented 9 years ago
This issue is also preventing me from adopting js2-mode.

Original comment by jrw...@gmail.com on 24 Oct 2010 at 9:23

GoogleCodeExporter commented 9 years ago
I've been playing w/ the following hack (commenting out the line (10725 in 
20097023b.el) that sets forward-sexp)
(defun js2-mode ()
  ;; ...
  ;; (set (make-local-variable 'forward-sexp-function) #'js2-mode-forward-sexp)
  ;; ...
)
I haven't seen any detrimental effects of this and only see the benefit of 
getting forward sexp and backward sexp to work properly.

Original comment by jrw...@gmail.com on 14 Nov 2010 at 6:01

GoogleCodeExporter commented 9 years ago
This problem is still happening in version 20120713 on emacs 24.1.1.

Original comment by Kal...@gmail.com on 25 Jul 2012 at 8:55