]> code.delx.au - gnu-emacs-elpa/commitdiff
Fix byte-compile warnings
authorDmitry Gutov <dgutov@yandex.ru>
Fri, 18 Feb 2011 19:35:03 +0000 (22:35 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Fri, 18 Feb 2011 19:35:03 +0000 (22:35 +0300)
js2-mode.el

index 9e5fd068da58011f64ecf4ff18ae217b7a2c3e99..b66a9f0516ddc50bd5bfe9ee64ae7c8e9647843c 100644 (file)
@@ -2024,6 +2024,10 @@ Returns nil if element is not found in the list."
   "Signal an error when we encounter an unexpected code path."
   (error "failed assertion"))
 
+(defsubst js2-record-text-property (beg end prop value)
+  "Record a text property to set when parsing finishes."
+  (push (list beg end prop value) js2-mode-deferred-properties))
+
 ;; I'd like to associate errors with nodes, but for now the
 ;; easiest thing to do is get the context info from the last token.
 (defsubst js2-record-parse-error (msg &optional arg pos len)
@@ -6236,10 +6240,6 @@ FACE is the face to fontify with."
                                     point-entered nil
                                     c-in-sws nil)))
 
-(defsubst js2-record-text-property (beg end prop value)
-  "Record a text property to set when parsing finishes."
-  (push (list beg end prop value) js2-mode-deferred-properties))
-
 (defconst js2-ecma-global-props
   (concat "^"
           (regexp-opt
@@ -6630,10 +6630,11 @@ of a simple name.  Called before EXPR has a parent node."
 (defun js2-record-name-node (node)
   "Saves NODE to `js2-recorded-identifiers' to check for undeclared variables
 later. NODE must be a name node."
-  (push (list node js2-current-scope
-              (setq leftpos (js2-node-abs-pos node))
-              (setq end (+ leftpos (js2-node-len node))))
-        js2-recorded-identifiers))
+  (let (leftpos end)
+    (push (list node js2-current-scope
+                (setq leftpos (js2-node-abs-pos node))
+                (setq end (+ leftpos (js2-node-len node))))
+          js2-recorded-identifiers)))
 
 (defun js2-highlight-undeclared-vars ()
   "After entire parse is finished, look for undeclared variable references.
@@ -6870,7 +6871,7 @@ that it's an external variable, which must also be in the top-level scope."
   "Modify function-declaration name chains after parsing finishes.
 Some of the information is only available after the parse tree is complete.
 For instance, following a 'this' reference requires a parent function node."
-  (let (result head fn parent-chain p elem)
+  (let (result head fn parent-chain p elem parent)
     (dolist (chain chains)
       ;; examine the head of each node to get its defining scope
       (setq head (car chain))