From 6667c6187753d476611282524148fd239309d3eb Mon Sep 17 00:00:00 2001 From: Steve Vinoski Date: Fri, 20 Dec 2013 16:03:51 -0500 Subject: fix erlang-mode erlang-get-function-arity In the emacs erlang-mode the function erlang-get-function-arity failed to return a correct arity value for functions with literal binaries as parameters, for example: function(<>) -> Bin. Fix erlang-get-function-arity to recognize binary parameters correctly. --- lib/tools/emacs/erlang.el | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/tools') diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el index c395d22356..b9a05572f7 100644 --- a/lib/tools/emacs/erlang.el +++ b/lib/tools/emacs/erlang.el @@ -3645,6 +3645,10 @@ Normally used in conjunction with `erlang-beginning-of-clause', e.g.: (setq cont nil)) ((looking-at "\\s *\\($\\|%\\)") (forward-line 1)) + ((looking-at "\\s *<<[^>]*?>>") + (when (zerop res) + (setq res (+ 1 res))) + (goto-char (match-end 0))) ((looking-at "\\s *,") (setq res (+ 1 res)) (goto-char (match-end 0))) -- cgit v1.2.3