[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 9ad7708 32/38: Add cl- prefix, improve line lengths
From: |
Dmitry Gutov |
Subject: |
[elpa] master 9ad7708 32/38: Add cl- prefix, improve line lengths |
Date: |
Wed, 09 Sep 2015 18:41:50 +0000 |
branch: master
commit 9ad77087eefa1625c5eb980aa59052c28087f411
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Add cl- prefix, improve line lengths
---
js2-mode.el | 50 ++++++++++++++++++++++++++++----------------------
1 files changed, 28 insertions(+), 22 deletions(-)
diff --git a/js2-mode.el b/js2-mode.el
index 321e52c..235c360 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -12307,19 +12307,19 @@ it marks the next defun after the ones already
marked."
(parent (js2-node-parent node))
(names (if (js2-prop-get-node-p parent)
(reverse (let ((temp (js2-compute-nested-prop-get parent)))
- (loop for n in temp
- with result = '()
- do (push n result)
- until (equal node n)
- finally return result)))))
+ (cl-loop for n in temp
+ with result = '()
+ do (push n result)
+ until (equal node n)
+ finally return result)))))
node-init)
(unless (and (js2-name-node-p node)
- (not (js2-var-init-node-p parent))
- (not (js2-function-node-p parent)))
+ (not (js2-var-init-node-p parent))
+ (not (js2-function-node-p parent)))
(error "Node is not a supported jump node"))
(push (or (and names (pop names))
- (unless (and (js2-object-prop-node-p parent)
- (eq node (js2-object-prop-node-left parent)))
+ (unless (and (js2-object-prop-node-p parent)
+ (eq node (js2-object-prop-node-left parent)))
node)) names)
(setq node-init (js2-search-scope node names))
@@ -12337,7 +12337,7 @@ it marks the next defun after the ones already marked."
(throw 'found b)))))
(buffer-list)))
nil)))
- (setq node-init (if (listp node-init) (first node-init) node-init))
+ (setq node-init (if (listp node-init) (car node-init) node-init))
(unless node-init
(pop-tag-mark)
(error "No jump location found"))
@@ -12351,9 +12351,11 @@ it marks the next defun after the ones already marked."
(cl-loop for elem in (js2-object-node-elems node)
for left = (js2-object-prop-node-left elem)
if (or (and (js2-name-node-p left)
- (equal (js2-name-node-name name-node) (js2-name-node-name
left)))
- (and (js2-string-node-p left)
- (string= (js2-name-node-name name-node)
(js2-string-node-value left))))
+ (equal (js2-name-node-name name-node)
+ (js2-name-node-name left)))
+ (and (js2-string-node-p left)
+ (string= (js2-name-node-name name-node)
+ (js2-string-node-value left))))
return elem))
(defun js2-search-object-for-prop (object prop-names)
@@ -12375,7 +12377,7 @@ i.e. ('name' 'value') = {name : { value: 3}}"
NAMES is a list of property values to search for. For functions
and variables NAMES will contain one element."
(let (node-init
- (val (js2-name-node-name (first names))))
+ (val (js2-name-node-name (car names))))
(setq node-init (js2-get-symbol-declaration node val))
(when (> (length names) 1)
@@ -12386,8 +12388,9 @@ and variables NAMES will contain one element."
(temp-names names))
(pop temp-names) ;; First element is var name
(setq node-init (when (js2-var-init-node-p parent)
- (js2-search-object-for-prop
(js2-var-init-node-initializer parent)
- temp-names)))))
+ (js2-search-object-for-prop
+ (js2-var-init-node-initializer parent)
+ temp-names)))))
;; Check all assign nodes
(js2-visit-ast
@@ -12400,15 +12403,18 @@ and variables NAMES will contain one element."
(temp-names names))
(when (js2-prop-get-node-p left)
(let* ((prop-list (js2-compute-nested-prop-get left))
- (found (loop for prop in prop-list
- until (not (string= (js2-name-node-name
(pop temp-names)) (js2-name-node-name prop)))
- if (not temp-names) return prop))
+ (found (cl-loop for prop in prop-list
+ until (not (string=
(js2-name-node-name
+ (pop
temp-names))
+
(js2-name-node-name prop)))
+ if (not temp-names) return prop))
(found-node (or found
- (when (js2-object-node-p right)
- (js2-search-object-for-prop right
temp-names)))))
+ (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))
+ node-init))
(defun js2-get-symbol-declaration (node name)
"Find scope for NAME from NODE."
- [elpa] master f942b83 26/38: Support jumping to buffers of the same major mode, (continued)
- [elpa] master f942b83 26/38: Support jumping to buffers of the same major mode, Dmitry Gutov, 2015/09/09
- [elpa] master 145c5d6 25/38: Fixed jumping to object properties, Dmitry Gutov, 2015/09/09
- [elpa] master bb0476c 29/38: Clarified js2-search-scope doc string, Dmitry Gutov, 2015/09/09
- [elpa] master c4f4095 28/38: Only jump if not already at var or function definition, Dmitry Gutov, 2015/09/09
- [elpa] master af85699 30/38: Clean up todo in js2-search-scope and fix year typo, Dmitry Gutov, 2015/09/09
- [elpa] master aaf218a 27/38: Find definition by locating assignment nodes, Dmitry Gutov, 2015/09/09
- [elpa] master e236923 31/38: Removed functions: js2-build-prop-name-list and js2-names-left., Dmitry Gutov, 2015/09/09
- [elpa] master 75129c1 33/38: Use cl-assert instead of error, Dmitry Gutov, 2015/09/09
- [elpa] master bbb5086 34/38: Remove a space, Dmitry Gutov, 2015/09/09
- [elpa] master 58335d4 36/38: Add NEWS and bump the version, Dmitry Gutov, 2015/09/09
- [elpa] master 9ad7708 32/38: Add cl- prefix, improve line lengths,
Dmitry Gutov <=
- [elpa] master ffa06cb 35/38: Explicitly remap js-find-symbol, Dmitry Gutov, 2015/09/09
- [elpa] master 5c9d8b8 37/38: Rephrase, Dmitry Gutov, 2015/09/09
- [elpa] master 5ffca32 38/38: Merge commit '5c9d8b82dddec2fab370ec8798569c7fc5698093' from js2-mode, Dmitry Gutov, 2015/09/09