From: Theodor Thornhill Date: Sat, 2 Sep 2023 17:34:46 +0000 (+0200) Subject: Ignore errors when checking for object initializers (bug#63379) X-Git-Tag: emacs-29.1.90~146 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dd896ea1e62a466faf7bce61e382ee1e9f35f6b8;p=emacs.git Ignore errors when checking for object initializers (bug#63379) Since this is merely a check for syntax, we don't really care about any internal errors inside of backward-up-list. * lisp/progmodes/csharp-mode.el (csharp-guess-basic-syntax): Wrap command in ignore-errors. --- diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el index fb5a3d450a7..53c52e62fa8 100644 --- a/lisp/progmodes/csharp-mode.el +++ b/lisp/progmodes/csharp-mode.el @@ -493,7 +493,7 @@ compilation and evaluation time conflicts." ;; Next non-whitespace character should be '{' (goto-char (c-point 'boi)) (unless (eq (char-after) ?{) - (backward-up-list 1 t t)) + (ignore-errors (backward-up-list 1 t t))) (save-excursion ;; 'new' should be part of the line (goto-char (c-point 'iopl))