emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/dart-mode 2410a15 025/192: Fix =>-style method indentation


From: ELPA Syncer
Subject: [nongnu] elpa/dart-mode 2410a15 025/192: Fix =>-style method indentation.
Date: Sun, 29 Aug 2021 11:01:43 -0400 (EDT)

branch: elpa/dart-mode
commit 2410a155cd8b341e683c4e4b083a1096fd702781
Author: Nathan Weizenbaum <nweiz@google.com>
Commit: Nathan Weizenbaum <nweiz@google.com>

    Fix =>-style method indentation.
---
 dart-mode.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/dart-mode.el b/dart-mode.el
index 173a67b..ece1301 100644
--- a/dart-mode.el
+++ b/dart-mode.el
@@ -32,8 +32,6 @@
 ;; * Multiline strings using """ and ''' are not recognized. They fontify
 ;;   correctly, but only because they look like three strings in a row.
 ;; * In a map with identifier keys, the first key is fontified like a label.
-;; * =>-style methods that span multiple lines can screw up indentation and
-;;   brace matching.
 ;; * Named constructors aren't fontified correctly.
 
 ;;; Code:
@@ -192,6 +190,13 @@ The other option, of course, is a map literal.
 SYNTAX-GUESS is the output of `c-guess-basic-syntax'."
   (save-excursion
     (c-safe
+      ;; If we're in a continued statement within a class, we want to know 
we're
+      ;; in a class so we can return true.
+      (when (eq 'statement-cont (caar syntax-guess))
+        (save-excursion
+          (c-beginning-of-statement-1 nil t t)
+          (setq syntax-guess (c-guess-basic-syntax))))
+
       (backward-up-list)
       (when (= (char-after) ?\{)
         (c-backward-comments)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]