diff --git a/mode/julia/julia.js b/mode/julia/julia.js
index 0174210b55778cdcd8d7f0d1a345a1aefe341c8a..8fc999f5f91a43cdc0ac632d1bc60a42c0720526 100644
--- a/mode/julia/julia.js
+++ b/mode/julia/julia.js
@@ -388,7 +388,7 @@ CodeMirror.defineMode("julia", function(config, parserConf) {
     indent: function(state, textAfter) {
       var delta = 0;
       if ( textAfter === ']' || textAfter === ')' || textAfter === "end" ||
-           textAfter === "else" || textAfter === "catch" ||
+           textAfter === "else" || textAfter === "catch" || textAfter === "elseif" ||
            textAfter === "finally" ) {
         delta = -1;
       }