File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed
Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -24,16 +24,14 @@ Put this file into your `load-path` and the following into your `~/.emacs`:
2424 (require 'nginx-mode)
2525```
2626
27- The mode should automatically activate for files :
27+ The mode automatically activates for:
2828
29- 1 . Called ` nginx.conf `
29+ 1 . Files, called ` nginx.conf `
30302 . Files ending in ` .conf ` under ` nginx ` directory
31- 3 . All files in ` nginx/sites-available ` and ` nginx/sites-enabled `
3231
33- If this does not work (e.g. shadowed by other packages autoload entries), this also goes to ` ~/.emacs ` :
32+ If you want ` sites-enabled ` dir, add this to ` ~/.emacs ` (not done by
33+ default, because can be shadowed by ` apache-mode ` ):
3434
3535``` lisp
36- (add-to-list 'auto-mode-alist '("nginx\\.conf\\'" . nginx-mode))
37- (add-to-list 'auto-mode-alist '("/nginx/.*\\.conf\\'" . nginx-mode))
3836(add-to-list 'auto-mode-alist '("/nginx/sites-\\(?:available\\|enabled\\)/" . nginx-mode))
3937```
Original file line number Diff line number Diff line change @@ -187,9 +187,7 @@ The variable nginx-indent-level controls the amount of indentation.
187187;;;### autoload
188188(add-to-list 'auto-mode-alist '(" nginx\\ .conf\\ '" . nginx-mode))
189189;;;### autoload
190- (add-to-list 'auto-mode-alist '(" /nginx/.*\\ .conf\\ '" . nginx-mode))
191- ;;;### autoload
192- (add-to-list 'auto-mode-alist '(" /nginx/sites-\\ (?:available\\ |enabled\\ )/" . nginx-mode))
190+ (add-to-list 'auto-mode-alist '(" /nginx/.+\\ .conf\\ '" . nginx-mode))
193191
194192(provide 'nginx-mode )
195193
You can’t perform that action at this time.
0 commit comments