diff -r 0fd01316e06e -r b64f9f90ca69 evil-core.el
--- a/evil-core.el	Wed Oct 31 15:56:48 2012 +0100
+++ b/evil-core.el	Wed Oct 31 17:33:43 2012 +0100
@@ -254,7 +254,8 @@
 if no initial state is associated with BUFFER.
 See also `evil-initial-state'."
   (with-current-buffer (or buffer (current-buffer))
-    (or (evil-initial-state-for-buffer-name (buffer-name))
+    (or evil-this-buffer-initial-state
+        (evil-initial-state-for-buffer-name (buffer-name))
         (catch 'done
           (dolist (mode minor-mode-map-alist)
             (setq mode (car-safe mode))
diff -r 0fd01316e06e -r b64f9f90ca69 evil-vars.el
--- a/evil-vars.el	Wed Oct 31 15:56:48 2012 +0100
+++ b/evil-vars.el	Wed Oct 31 17:33:43 2012 +0100
@@ -898,6 +898,13 @@
      (make-variable-buffer-local ',symbol)
      (put ',symbol 'permanent-local t)))
 
+(evil-define-local-var evil-this-buffer-initial-state nil
+  "The initial state of the current buffer.
+If this variable is set to non-nil, it will overwrite all other
+possibilities to determine the initial state for the current
+buffer. Note that it must be set *before* evil is initialized,
+e.g. in a buffer local variable.")
+
 (evil-define-local-var evil-state nil
   "The current Evil state.
 To change the state, use `evil-change-state'
