branch: master commit af8569926239e73eccb091500f4b6e5c0f5e9d20 Author: ScottyB <scott.n.barn...@gmail.com> Commit: ScottyB <scott.n.barn...@gmail.com>
Clean up todo in js2-search-scope and fix year typo --- js2-mode.el | 16 +++++++--------- tests/navigation.el | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/js2-mode.el b/js2-mode.el index 2d762e0..a42c02c 100644 --- a/js2-mode.el +++ b/js2-mode.el @@ -12413,15 +12413,13 @@ and variables NAMES will contain one element." (prop-names (mapcar 'car prop-list)) (found (loop for prop in prop-names until (not (string= (pop temp-names) prop)) - if (not temp-names) return prop))) - - ;; todo: clean this up! - (if found (push (cdr (assoc found prop-list)) node-init) - (when (js2-object-node-p right) - (setq found (js2-search-object-for-prop right temp-names))) - (if found (push found node-init)))))) - t))))) - node-init)) + if (not temp-names) return prop)) + (found-node (if found (cdr (assoc found prop-list)) + (when (js2-object-node-p right) + (js2-search-object-for-prop right temp-names))))) + (if found-node (push found-node node-init)))))) + t)))) + node-init)) (defun js2-names-left (name-node) "Returns a list of names for a `js2-prop-get-node'. diff --git a/tests/navigation.el b/tests/navigation.el index 3a3c240..d7a8314 100644 --- a/tests/navigation.el +++ b/tests/navigation.el @@ -1,6 +1,6 @@ ;;; tests/navigation.el --- Some tests for js2-mode. -;; Copyright (C) 2009, 2011-2013 Free Software Foundation, Inc. +;; Copyright (C) 2009, 2011-2015 Free Software Foundation, Inc. ;; This file is part of GNU Emacs.