Skip to content

Commit bb5d84b

Browse files
author
Vasily Korytov
committed
removed sites-enabled from default (has issues with apache-mode autoloads)
1 parent 5990ae9 commit bb5d84b

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff 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`
3030
2. 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
```

nginx-mode.el

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)