[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master ac93b9e 21/22: Address two FIXMEs; fix a regression flagge
From: |
Dmitry Gutov |
Subject: |
[elpa] master ac93b9e 21/22: Address two FIXMEs; fix a regression flagged by tests |
Date: |
Fri, 24 Apr 2015 02:57:17 +0000 |
branch: master
commit ac93b9eef9b6ac44d187b9688d68a7a5f205b3fe
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Address two FIXMEs; fix a regression flagged by tests
---
js2-mode.el | 21 +++------------------
1 files changed, 3 insertions(+), 18 deletions(-)
diff --git a/js2-mode.el b/js2-mode.el
index 9bfaa54..2dd5d9d 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -10165,7 +10165,7 @@ EXPR is the first expression after the opening
left-bracket.
POS is the beginning of the LB token preceding EXPR.
We should have just parsed the 'for' keyword before calling this function."
(let ((current-scope js2-current-scope)
- loops filter result)
+ loops first filter result)
(unwind-protect
(progn
(while (js2-match-token js2-FOR)
@@ -10174,7 +10174,7 @@ We should have just parsed the 'for' keyword before
calling this function."
(push loop loops)
(js2-parse-comp-loop loop)))
;; First loop takes expr scope's parent.
- (setf (js2-scope-parent-scope (car (last loops)))
+ (setf (js2-scope-parent-scope (setq first (car (last loops))))
(js2-scope-parent-scope current-scope))
;; Set expr scope's parent to the last loop.
(setf (js2-scope-parent-scope current-scope) (car loops))
@@ -11626,13 +11626,6 @@ The last element is optional. When present, use
instead of FACE."
(when (overlay-get o 'js2-error)
(delete-overlay o))))))
-(defun js2-error-at-point (&optional pos)
- "Return non-nil if there's an error overlay at POS.
-Defaults to point."
- (cl-loop with pos = (or pos (point))
- for o in (overlays-at pos)
- thereis (overlay-get o 'js2-error)))
-
(defun js2-mode-apply-deferred-properties ()
"Apply fontifications and other text properties recorded during parsing."
(when (cl-plusp js2-highlight-level)
@@ -11702,9 +11695,6 @@ was found on `point-entered' or in
`cursor-sensor-functions'."
(not (current-message)))
(message msg))))
-;; FIXME: Why do we keep this?
-(define-obsolete-function-alias 'js2-echo-help #'js2-echo-error "forever")
-
(defun js2-line-break (&optional _soft)
"Break line at point and indent, continuing comment if within one.
If inside a string, and `js2-concat-multiline-strings' is not
@@ -11761,12 +11751,7 @@ PARSE-STATUS is as documented in `parse-partial-sexp'."
;; comment.
(setq needs-close
(or
- ;; FIXME: Why not (get-char-property <pos> 'js2-error) instead?
- (if (fboundp 'cursor-sensor-mode)
- (equal (get-text-property (1- (point)) 'cursor-sensor-functions)
- '(js2-echo-error))
- (eq (get-text-property (1- (point)) 'point-entered)
- 'js2-echo-error))
+ (get-char-property (1- (point)) 'js2-error)
;; The heuristic above doesn't work well when we're
;; creating a comment and there's another one downstream,
;; as our parser thinks this one ends at the end of the
- [elpa] master 90a9056 10/22: ...or any following one, (continued)
- [elpa] master 90a9056 10/22: ...or any following one, Dmitry Gutov, 2015/04/23
- [elpa] master bc61ce0 11/22: Fix off-by-one error for comment node length, Dmitry Gutov, 2015/04/23
- [elpa] master 3b76567 12/22: Fix js2-node-get-enclosing-scope, Dmitry Gutov, 2015/04/23
- [elpa] master 458d3fe 14/22: Merge pull request #221 from jacksonrayhamilton/enclosing-scope, Dmitry Gutov, 2015/04/23
- [elpa] master a184642 13/22: Merge pull request #220 from jacksonrayhamilton/comment-length, Dmitry Gutov, 2015/04/23
- [elpa] master 2bb4db0 15/22: Assign quote syntax to backquotes, Dmitry Gutov, 2015/04/23
- [elpa] master 4de6f03 16/22: Don't indent in multiline strings, Dmitry Gutov, 2015/04/23
- [elpa] master ee4a202 18/22: Merge pull request #195 from jacksonrayhamilton/pretty-multiline-declarations, Dmitry Gutov, 2015/04/23
- [elpa] master d4d9c54 17/22: js2-pretty-multiline-declarations: Add 'dynamic option, Dmitry Gutov, 2015/04/23
- [elpa] master 9790b97 19/22: * js2-mode.el (js2-mode): Use cursor-sensor-mode if available., Dmitry Gutov, 2015/04/23
- [elpa] master ac93b9e 21/22: Address two FIXMEs; fix a regression flagged by tests,
Dmitry Gutov <=
- [elpa] master 022ef95 20/22: Merge commit '9790b9781aa8ca1d4bdf94d06d4e8ff2e68d37e8' into js2-mode-master, Dmitry Gutov, 2015/04/23
- [elpa] master 54df259 22/22: Merge commit 'ac93b9eef9b6ac44d187b9688d68a7a5f205b3fe' from js2-mode, Dmitry Gutov, 2015/04/23