aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/emacs/erlang.el
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2010-03-22 15:08:29 +0000
committerErlang/OTP <[email protected]>2010-03-22 15:08:29 +0000
commit99101783758b3e4805284aaec16d34dc3597158e (patch)
tree07c1ab851caccc9f17e2a91d2f442dd3a3675804 /lib/tools/emacs/erlang.el
parenta4b4d36cdbbd692123443a1d3f19f1c452963201 (diff)
parent228e1f013f99e2d2fb4ee0f7a9cb5d21638756a8 (diff)
downloadotp-99101783758b3e4805284aaec16d34dc3597158e.tar.gz
otp-99101783758b3e4805284aaec16d34dc3597158e.tar.bz2
otp-99101783758b3e4805284aaec16d34dc3597158e.zip
Merge branch 'dgud/emacs-bugfixes' into dev
* dgud/emacs-bugfixes: Fix another -spec() problem Add missing elisp files to the the release target Fix electric semi-colon and tuples inside lists OTP-8530 dgud/emacs-bugfixes Fixed emacs-mode installation problems and some other minor issues.
Diffstat (limited to 'lib/tools/emacs/erlang.el')
-rw-r--r--lib/tools/emacs/erlang.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el
index da586ee09a..a84f40244d 100644
--- a/lib/tools/emacs/erlang.el
+++ b/lib/tools/emacs/erlang.el
@@ -2653,7 +2653,8 @@ Value is list (stack token-start token-type in-what)."
(cond ((eq (car (car stack)) '\()
(erlang-pop stack)
(if (and (eq (car (car stack)) 'fun)
- (eq (car (car (cdr stack))) '::))
+ (or (eq (car (car (last stack))) 'spec)
+ (eq (car (car (cdr stack))) '::))) ;; -type()
;; Inside fun type def ') closes fun definition
(erlang-pop stack)))
((eq (car (car stack)) 'icr)
@@ -2874,8 +2875,8 @@ Return nil if inside string, t if in a comment."
(+ base erlang-indent-level))
(t
(goto-char indent-point)
- (cond ((memq (following-char) '(?\( ?{))
- ;; Function application or record.
+ (cond ((memq (following-char) '(?\( ))
+ ;; Function application.
(+ (erlang-indent-find-preceding-expr)
erlang-argument-indent))
;; Empty line, or end; treat it as the end of
@@ -3472,8 +3473,8 @@ Normally used in conjunction with `erlang-beginning-of-clause', e.g.:
(erlang-get-function-arrow)))"
(and
(save-excursion
- (re-search-forward "[^-:]*-\\|:" (point-max) t)
- (erlang-buffer-substring (- (point) 1) (+ (point) 1)))))
+ (re-search-forward "->" (point-max) t)
+ (erlang-buffer-substring (- (point) 2) (+ (point) 1)))))
(defun erlang-get-function-arity ()
"Return the number of arguments of function at point, or nil."
@@ -3677,6 +3678,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)
(if (condition-case nil