aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/emacs
diff options
context:
space:
mode:
authorMagnus Henoch <[email protected]>2015-09-15 16:34:08 +0100
committerMagnus Henoch <[email protected]>2015-09-15 16:34:08 +0100
commit3e8de426873759d6e9f6b2f82b55ad4256d6a39f (patch)
treee55e0da86df823c18d198507815eb91afc215141 /lib/tools/emacs
parent59911612aec5f18b099dbc518089dd3ce48fdd97 (diff)
downloadotp-3e8de426873759d6e9f6b2f82b55ad4256d6a39f.tar.gz
otp-3e8de426873759d6e9f6b2f82b55ad4256d6a39f.tar.bz2
otp-3e8de426873759d6e9f6b2f82b55ad4256d6a39f.zip
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.
Diffstat (limited to 'lib/tools/emacs')
-rw-r--r--lib/tools/emacs/erlang.el2
1 files changed, 1 insertions, 1 deletions
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)))