diff options
author | Dan Gudmundsson <[email protected]> | 2018-01-10 16:23:05 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2018-03-01 14:39:50 +0100 |
commit | 13f1dec0220d44e5178feb52cf076dbdebaa23a0 (patch) | |
tree | 7275f63736cacb3d167404d500026a7b4c18bff4 /lib/tools/emacs | |
parent | f0a74dfbaf87f65f6fe7f63fa63965a35fa30faa (diff) | |
download | otp-13f1dec0220d44e5178feb52cf076dbdebaa23a0.tar.gz otp-13f1dec0220d44e5178feb52cf076dbdebaa23a0.tar.bz2 otp-13f1dec0220d44e5178feb52cf076dbdebaa23a0.zip |
emacs: delimiter first in icr works
Diffstat (limited to 'lib/tools/emacs')
-rw-r--r-- | lib/tools/emacs/erlang.el | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el index 08ef83f848..df04e7baff 100644 --- a/lib/tools/emacs/erlang.el +++ b/lib/tools/emacs/erlang.el @@ -4,7 +4,7 @@ ;; Author: Anders Lindgren ;; Keywords: erlang, languages, processes ;; Date: 2011-12-11 -;; Version: 2.8.0 +;; Version: 2.8.1 ;; Package-Requires: ((emacs "24.1")) ;; %CopyrightBegin% @@ -84,7 +84,7 @@ "The Erlang programming language." :group 'languages) -(defconst erlang-version "2.8.0" +(defconst erlang-version "2.8.1" "The version number of Erlang mode.") (defcustom erlang-root-dir nil @@ -2827,12 +2827,13 @@ Return nil if inside string, t if in a comment." (let ((base (erlang-indent-find-base stack indent-point off skip))) ;; Special cases (goto-char indent-point) - (cond ((looking-at "\\(end\\|after\\)\\($\\|[^_a-zA-Z0-9]\\)") + (cond ((looking-at "\\(;\\|end\\|after\\)\\($\\|[^_a-zA-Z0-9]\\)") (if (eq (car stack-top) '->) (erlang-pop stack)) - (if stack - (erlang-caddr (car stack)) - 0)) + (cond ((and stack (looking-at ";")) + (+ (erlang-caddr (car stack)) (- erlang-indent-level 2))) + (stack (erlang-caddr (car stack))) + (t off))) ((looking-at "catch\\b\\($\\|[^_a-zA-Z0-9]\\)") ;; Are we in a try (let ((start (if (eq (car stack-top) '->) |