(eval-when-compile\r
(require 'cl))\r
\r
+(require 'js2-mode)\r
+\r
(defconst js2-imenu-extension-styles\r
`((:framework jquery\r
:call-re "\\_<\\(?:jQuery\\|\\$\\|_\\)\\.extend\\s-*("\r
(concat "\\(" (plist-get style :call-re) "\\)"))\r
styles "\\|"))\r
;; Dynamic scoping. Ew.\r
- (js2-mode-ast root)\r
- chains)\r
+ (js2-mode-ast root))\r
(goto-char (point-min))\r
(while (js-re-search-forward re nil t)\r
- (push (loop for i from 0 to (1- (length styles))\r
- when (match-beginning (1+ i))\r
- return (funcall (plist-get (nth i styles) :recorder)))\r
- chains))\r
- chains))\r
+ (loop for i from 0 to (1- (length styles))\r
+ when (match-beginning (1+ i))\r
+ return (funcall (plist-get (nth i styles) :recorder))))))\r
\r
(defun js2-imenu-record-jquery-extend ()\r
(let ((pred (lambda (subject)\r