]> code.delx.au - gnu-emacs-elpa/commitdiff
fixed bugs indentation
authormooz <stillpedant@gmail.com>
Thu, 30 Dec 2010 02:17:37 +0000 (11:17 +0900)
committermooz <stillpedant@gmail.com>
Thu, 30 Dec 2010 02:17:55 +0000 (11:17 +0900)
js2-mode.el

index 9ebca58c20cc6d5f0d05431ece3d5a08bb0ff465..1c06b0eac273237b7fd89e932f47fcf116b7907d 100644 (file)
@@ -9811,8 +9811,8 @@ indented to the same column as the current line."
 
 "
   (let* ((node (js2-node-at-point))
-         (pnode (js2-node-parent node))
-         (pnode-type (js2-node-type pnode)))
+         (pnode (and node (js2-node-parent node)))
+         (pnode-type (and pnode (js2-node-type pnode))))
     (if (and node
              (= js2-NAME (js2-node-type node))
              (or