diff options
author | Steve Vinoski <[email protected]> | 2013-12-20 16:03:51 -0500 |
---|---|---|
committer | Steve Vinoski <[email protected]> | 2013-12-20 16:03:51 -0500 |
commit | 6667c6187753d476611282524148fd239309d3eb (patch) | |
tree | 29f3b680dc442896dcf30ca5766e60ce9094a20a /lib/tools/emacs/erlang.el | |
parent | 25237481ccccd3ddfa74582dc267632ad618ba30 (diff) | |
download | otp-6667c6187753d476611282524148fd239309d3eb.tar.gz otp-6667c6187753d476611282524148fd239309d3eb.tar.bz2 otp-6667c6187753d476611282524148fd239309d3eb.zip |
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:20/binary>>) -> Bin.
Fix erlang-get-function-arity to recognize binary parameters correctly.
Diffstat (limited to 'lib/tools/emacs/erlang.el')
-rw-r--r-- | lib/tools/emacs/erlang.el | 4 |
1 files changed, 4 insertions, 0 deletions
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))) |