emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master a117465 32/45: Handle "arguments" specially


From: Dmitry Gutov
Subject: [elpa] master a117465 32/45: Handle "arguments" specially
Date: Mon, 02 Feb 2015 03:18:46 +0000

branch: master
commit a117465c086eded306b5f35947984719f8cbf093
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Handle "arguments" specially
    
    Fixes #199
---
 js2-mode.el |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/js2-mode.el b/js2-mode.el
index 5a7f650..c332cfc 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -101,7 +101,7 @@
   (mapcar 'symbol-name
           '(Array Boolean Date Error EvalError Function Infinity JSON
           Math NaN Number Object RangeError ReferenceError RegExp
-          String SyntaxError TypeError URIError arguments
+          String SyntaxError TypeError URIError
           decodeURI decodeURIComponent encodeURI
           encodeURIComponent escape eval isFinite isNaN
           parseFloat parseInt undefined unescape))
@@ -2325,8 +2325,11 @@ Returns `js2-scope' in which NAME is defined, or nil if 
not found."
         result
         (continue t))
     (while (and scope continue)
-      (if (and (setq table (js2-scope-symbol-table scope))
-               (assq sym table))
+      (if (or
+           (and (setq table (js2-scope-symbol-table scope))
+                (assq sym table))
+           (and (eq sym 'arguments)
+                (js2-function-node-p scope)))
           (setq continue nil
                 result scope)
         (setq scope (js2-scope-parent-scope scope))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]