diff options
author | Erlang/OTP <[email protected]> | 2009-12-15 15:23:03 +0100 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2009-12-15 15:23:03 +0100 |
commit | cb62972ca24198cc13e030adbd0b8a757bdb293c (patch) | |
tree | 05eaab89e318613f1d4fb64cb477345ddcf512b6 /lib/tools/emacs | |
parent | a0c385e10b16c7697ad744bc63d7ce4d0439ca6e (diff) | |
parent | 889208661105bf2e296c168ed0afa7452db137df (diff) | |
download | otp-cb62972ca24198cc13e030adbd0b8a757bdb293c.tar.gz otp-cb62972ca24198cc13e030adbd0b8a757bdb293c.tar.bz2 otp-cb62972ca24198cc13e030adbd0b8a757bdb293c.zip |
Merge branch 'dgud/emacs-improvements' into ccase/r13b04_dev
Diffstat (limited to 'lib/tools/emacs')
-rw-r--r-- | lib/tools/emacs/erlang.el | 9 | ||||
-rw-r--r-- | lib/tools/emacs/test.erl.indented | 7 | ||||
-rw-r--r-- | lib/tools/emacs/test.erl.orig | 5 |
3 files changed, 16 insertions, 5 deletions
diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el index f623e3a1ee..b352ae7cce 100644 --- a/lib/tools/emacs/erlang.el +++ b/lib/tools/emacs/erlang.el @@ -72,7 +72,7 @@ ;; Variables: -(defconst erlang-version "2.6.1" +(defconst erlang-version "2.6.2" "The version number of Erlang mode.") (defvar erlang-root-dir nil @@ -3792,9 +3792,9 @@ Value is list (stack token-start token-type in-what)." ;; Clause end ((= (following-char) ?\;) - (if (and stack (and (eq (car (car stack)) 'when) - (eq (car (car (cdr (cdr stack)))) 'spec))) - (erlang-pop stack)) + (if (eq (car (car (last stack))) 'spec) + (while (memq (car (car stack)) '(when ::)) + (erlang-pop stack))) (if (and stack (eq (car (car stack)) '->)) (erlang-pop stack)) (forward-char 1)) @@ -4946,6 +4946,7 @@ non-whitespace characters following the point on the current line." (setq erlang-electric-newline-inhibit nil) (setq erlang-electric-newline-inhibit t) (undo-boundary) + (erlang-indent-line) (end-of-line) (newline) (condition-case nil diff --git a/lib/tools/emacs/test.erl.indented b/lib/tools/emacs/test.erl.indented index b2cc23b92b..1d91b2f155 100644 --- a/lib/tools/emacs/test.erl.indented +++ b/lib/tools/emacs/test.erl.indented @@ -110,6 +110,11 @@ (t24()) -> t24() when is_subtype(t24(), atom()), is_subtype(t24(), t14()), is_subtype(t24(), t4()). + +-spec over(I :: integer()) -> R1 :: foo:typen(); + (A :: atom()) -> R2 :: foo:atomen(); + (T :: tuple()) -> R3 :: bar:typen(). + -spec mod:t2() -> any(). -opaque attributes_data() :: [{'column', column()} | {'line', info_line()} | @@ -359,7 +364,7 @@ indent_icr(Z) -> % icr = if case receive X = 43 div 4, foo(X) end, - receive + receive {Z,_,_} -> X = 43 div 4, foo(X); diff --git a/lib/tools/emacs/test.erl.orig b/lib/tools/emacs/test.erl.orig index 773998a4c6..049fc21286 100644 --- a/lib/tools/emacs/test.erl.orig +++ b/lib/tools/emacs/test.erl.orig @@ -110,6 +110,11 @@ t15(),t20(),t21(), t22(),t25()}. (t24()) -> t24() when is_subtype(t24(), atom()), is_subtype(t24(), t14()), is_subtype(t24(), t4()). + +-spec over(I :: integer()) -> R1 :: foo:typen(); + (A :: atom()) -> R2 :: foo:atomen(); + (T :: tuple()) -> R3 :: bar:typen(). + -spec mod:t2() -> any(). -opaque attributes_data() :: [{'column', column()} | {'line', info_line()} | |