summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--nginx-mode.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/nginx-mode.el b/nginx-mode.el
index 03ec64f..34f1e11 100644
--- a/nginx-mode.el
+++ b/nginx-mode.el
@@ -190,6 +190,11 @@ The variable nginx-indent-level controls the amount of indentation.
(add-to-list 'auto-mode-alist '("nginx\\.conf\\'" . nginx-mode))
;;;###autoload
(add-to-list 'auto-mode-alist '("/nginx/.+\\.conf\\'" . nginx-mode))
+;;;###autoload
+(add-to-list
+ 'magic-fallback-mode-alist
+ '("\\(?:.*\n\\)*\\(?:http\\|server\\|location .+\\|upstream .+\\)[ \n\t]+{"
+ . nginx-mode))
(provide 'nginx-mode)