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

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

[nongnu] elpa/dart-mode 1f65c88 083/192: Add LIMIT argument for looking-


From: ELPA Syncer
Subject: [nongnu] elpa/dart-mode 1f65c88 083/192: Add LIMIT argument for looking-back (#34)
Date: Sun, 29 Aug 2021 11:01:55 -0400 (EDT)

branch: elpa/dart-mode
commit 1f65c88dbc55dfc6c7d5322e693d6d30962b27ea
Author: Philipp Stephani <p.stephani2+github@gmail.com>
Commit: Natalie Weizenbaum <nweiz@google.com>

    Add LIMIT argument for looking-back (#34)
    
    In Emacs 25, looking-back requires a LIMIT argument.
---
 dart-mode.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dart-mode.el b/dart-mode.el
index ab9cc07..b90674a 100644
--- a/dart-mode.el
+++ b/dart-mode.el
@@ -281,8 +281,9 @@ SYNTAX-GUESS is the output of `c-guess-basic-syntax'."
          ;; code block.
          (= (char-before) ?\))
          ;; "else" and "try" are the only keywords that come immediately before
-         ;; a block.
-         (looking-back "\\<\\(else\\|try\\)\\>")
+         ;; a block.  Look only back at most 4 characters (the length of
+         ;; "else") for performance reasons.
+         (looking-back "\\<\\(else\\|try\\)\\>" (- (point) 4))
          ;; CC is good at figuring out if we're in a class.
          (assq 'inclass syntax-guess))))))
 



reply via email to

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