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

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

[nongnu] elpa/typescript-mode de1a696c3c 174/222: Ignore errors from bac


From: ELPA Syncer
Subject: [nongnu] elpa/typescript-mode de1a696c3c 174/222: Ignore errors from backward-list
Date: Sun, 6 Feb 2022 16:59:30 -0500 (EST)

branch: elpa/typescript-mode
commit de1a696c3c4973da169ebd9c4ace57bf473fc3c0
Author: Jevri <31509799+Jevri@users.noreply.github.com>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>

    Ignore errors from backward-list
    
    We can not assume that we can move back to the start of the parameter
    list list, as the start parentheses may not be there. We will then
    just depending on the indention of the line with the end parentheses.
---
 typescript-mode.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/typescript-mode.el b/typescript-mode.el
index 9f0dd9c03d..1638dfa915 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -2478,7 +2478,9 @@ moved on success."
                        ;; In that case, we want the code that follows to see 
the indentation
                        ;; that was in effect at the beginning of the function 
declaration, and thus
                        ;; we want to move back over the list of function 
parameters.
-                       (backward-list))
+                       (condition-case nil
+                           (backward-list)
+                         (error nil)))
                       ((looking-back "," nil)
                        ;; If we get here, we have a comma, spaces and an 
opening curly brace. (And
                        ;; (point) is just after the comma.) We don't want to 
move from the current position



reply via email to

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