diff --git a/AUTHORS b/AUTHORS
index 823dd8806366c1dfd3d980fccbd23e594a4a9371..88e625bec0ac34e5c48cbba88fcdbf5ffe275fa9 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -574,6 +574,7 @@ Shmuel Englard
 Shubham Jain
 Siamak Mokhtari
 silverwind
+Simon Edwards
 sinkuu
 snasa
 soliton4
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a9e3c0014c8eb0cfa21d832f15a250871944c3a9..62b337e7c9fcc6a46c63e9be9dd7625161450f70 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,11 @@
+## 5.27.4 (2017-06-29)
+
+### Bug fixes
+
+Fix crash when using mode lookahead.
+
+[markdown mode](http://codemirror.net/mode/markdown/): Don't block inner mode's indentation support.
+
 ## 5.27.2 (2017-06-22)
 
 ### Bug fixes
diff --git a/doc/manual.html b/doc/manual.html
index 7f4a570263159ee9da0fe4712399afef7ee17549..e28e8012914f6a5c55d71b9fa7e183834e9e7256 100644
--- a/doc/manual.html
+++ b/doc/manual.html
@@ -69,7 +69,7 @@
 <section class=first id=overview>
     <h2 style="position: relative">
       User manual and reference guide
-      <span style="color: #888; font-size: 1rem; position: absolute; right: 0; bottom: 0">version 5.27.3</span>
+      <span style="color: #888; font-size: 1rem; position: absolute; right: 0; bottom: 0">version 5.27.4</span>
     </h2>
 
     <p>CodeMirror is a code-editor component that can be embedded in
diff --git a/doc/releases.html b/doc/releases.html
index 70e722ed8f28b796f74abc3f86357b89fa13fc02..15bd24e1635161bc9838f313c618cbbdfaf6ddfe 100644
--- a/doc/releases.html
+++ b/doc/releases.html
@@ -30,6 +30,13 @@
 
   <h2>Version 5.x</h2>
 
+  <p class="rel">29-06-2017: <a href="http://codemirror.net/codemirror-5.27.4.zip">Version 5.27.4</a>:</p>
+
+  <ul>
+    <li>Fix crash when using mode lookahead.</li>
+    <li><a href="http://codemirror.net/mode/markdown/">markdown mode</a>: Don't block inner mode's indentation support.</li>
+  </ul>
+
   <p class="rel">22-06-2017: <a href="http://codemirror.net/codemirror-5.27.2.zip">Version 5.27.2</a>:</p>
 
   <ul>
diff --git a/index.html b/index.html
index 19ae78ad9e7f59d9b03f6ad4d2ec8b85472f1e7d..baa0a33bf7567dbee9c668da1684ee95ffccc7da 100644
--- a/index.html
+++ b/index.html
@@ -96,7 +96,7 @@
       </div>
     </div>
     <div class=actionsleft>
-      Get the current version: <a href="http://codemirror.net/codemirror.zip">5.27.2</a>.<br>
+      Get the current version: <a href="http://codemirror.net/codemirror.zip">5.27.4</a>.<br>
       You can see the <a href="https://github.com/codemirror/codemirror" title="Github repository">code</a>,<br>
       read the <a href="doc/releases.html">release notes</a>,<br>
       or study the <a href="doc/manual.html">user manual</a>.
diff --git a/package.json b/package.json
index c856e9dfa3783d9deb3b93e543f9773f860c10d4..159b945874796a3a6466414295d36e61e9fb5772 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "codemirror",
-  "version": "5.27.3",
+  "version": "5.27.4",
   "main": "lib/codemirror.js",
   "style": "lib/codemirror.css",
   "description": "Full-featured in-browser code editor",
diff --git a/src/edit/main.js b/src/edit/main.js
index ac62ebe91800949862ca3e074529e2f23a778eac..c87aa33f5160391551be5bbabc62dd8b4030343a 100644
--- a/src/edit/main.js
+++ b/src/edit/main.js
@@ -66,4 +66,4 @@ import { addLegacyProps } from "./legacy"
 
 addLegacyProps(CodeMirror)
 
-CodeMirror.version = "5.27.3"
+CodeMirror.version = "5.27.4"