From 3e8de426873759d6e9f6b2f82b55ad4256d6a39f Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Tue, 15 Sep 2015 16:34:08 +0100 Subject: Don't add newline after arrow on -callback lines In the Emacs Erlang mode, typing "->" will usually automatically add a newline, which is usually what you want when writing a function, but not when writing a type spec. Therefore, there is a check for not adding the newline when the current line starts with -spec or -type. This change adds -callback to that check, since it is usually written the same way as type specs. --- lib/tools/emacs/erlang.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/tools') diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el index 4aa1ab7d38..466bf139b9 100644 --- a/lib/tools/emacs/erlang.el +++ b/lib/tools/emacs/erlang.el @@ -4236,7 +4236,7 @@ This function is designed to be a member of a criteria list." This function is designed to be a member of a criteria list." (save-excursion (beginning-of-line) - (when (save-match-data (looking-at "-\\(spec\\|type\\)")) + (when (save-match-data (looking-at "-\\(spec\\|type\\|callback\\)")) 'stop))) -- cgit v1.2.3