From fbefef025128e65fdfb562b485820dcb1ab04e99 Mon Sep 17 00:00:00 2001 From: Steve Vinoski Date: Fri, 10 Jan 2014 19:57:58 -0500 Subject: fix indentation error from scan-sexp in erlang.el Fix an indentation error being returned by scan-sexp, and add a new indentation test case for the error. --- lib/tools/emacs/erlang.el | 2 +- lib/tools/emacs/test.erl.indented | 5 +++++ lib/tools/emacs/test.erl.orig | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'lib/tools') diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el index c395d22356..3ab73dca86 100644 --- a/lib/tools/emacs/erlang.el +++ b/lib/tools/emacs/erlang.el @@ -3038,7 +3038,7 @@ This assumes that the preceding expression is either simple \(i.e. an atom) or parenthesized." (save-excursion (or arg (setq arg 1)) - (forward-sexp (- arg)) + (ignore-errors (forward-sexp (- arg))) (let ((col (current-column))) (skip-chars-backward " \t") ;; Special hack to handle: (note line break) diff --git a/lib/tools/emacs/test.erl.indented b/lib/tools/emacs/test.erl.indented index 7e61bcc45b..ba173a8cc2 100644 --- a/lib/tools/emacs/test.erl.indented +++ b/lib/tools/emacs/test.erl.indented @@ -731,3 +731,8 @@ commas_first() -> ] } ] }. + + +%% this used to result in a scan-sexp error +[{ + }]. diff --git a/lib/tools/emacs/test.erl.orig b/lib/tools/emacs/test.erl.orig index 932758997d..cb3d1f94dc 100644 --- a/lib/tools/emacs/test.erl.orig +++ b/lib/tools/emacs/test.erl.orig @@ -731,3 +731,8 @@ commas_first() -> ] } ] }. + + +%% this used to result in a scan-sexp error +[{ +}]. -- cgit v1.2.3