branch: elpa/typescript-mode
commit de1a696c3c4973da169ebd9c4ace57bf473fc3c0
Author: Jevri <[email protected]>
Commit: Jostein Kjønigsen <[email protected]>
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