branch: elpa/dart-mode
commit e5bd30dba5588633d5cb4ea1ded7b4c7579cec8a
Author: Brady Trainor <[email protected]>
Commit: Brady Trainor <[email protected]>

    Avoid false positives
---
 dart-mode.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dart-mode.el b/dart-mode.el
index 7ed7855..445ee00 100644
--- a/dart-mode.el
+++ b/dart-mode.el
@@ -280,7 +280,7 @@ matched."
   (catch 'result
     (let (beg end)
         (while (re-search-forward
-                (rx (group (eval (dart--identifier 'lower))) ?\() limit t)
+                (rx (and (not (any ?\.)) (group (eval (dart--identifier 
'lower)))) ?\() limit t)
           (setq beg (match-beginning 1))
           (setq end (match-end 1))
           (condition-case nil
@@ -291,6 +291,7 @@ matched."
                   (goto-char beg)
                   (back-to-indentation)
                   (when (and (= (current-column) 2)
+                             (not (looking-at "return"))
                              (string-match-p
                               " " (buffer-substring-no-properties
                                    (point) beg))

Reply via email to