Skip to content

Commit 1c47278

Browse files
committed
Fix addition of pollen-mode to auto-mode-alist
1 parent 575ae91 commit 1c47278

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ and the [Scribble Emacs mode](https://github.com/emacs-pe/scribble-mode).
1212

1313
Download `pollen-mode` to your emacs lisp directory.
1414

15+
```bash
1516
git clone https://github.com/basus/pollen-mode.git ~/.emacs.d/lisp/pollen-mode
17+
```
1618

1719
Then add the following to `~/.emacs.d/init.el`:
1820

21+
```bash
1922
(add-to-list 'load-path (expand-file-name "lisp/pollen-mode" user-emacs-directory))
2023
(autoload 'pollen-mode "pollen" "A major mode for the pollen preprocessor." t)
21-
(add-to-list 'auto-mode-alist '("\\.pp\\'" . pollen-mode))
22-
(add-to-list 'auto-mode-alist '("\\.pmd\\'" . pollen-mode))
23-
(add-to-list 'auto-mode-alist '("\\.pm\\'" . pollen-mode))
24-
(add-to-list 'auto-mode-alist '("\\.ptree\\'" . pollen-mode))
24+
```
2525

2626
Restart emacs. `pollen-mode` should activate when you open a file with
2727
a `.pp` extension.

pollen.el

+5-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ For other licenses and consulting, please contact the author.")
6060
(mapc (lambda (pair)
6161
(or (assoc (car pair) auto-mode-alist)
6262
(push pair auto-mode-alist)))
63-
'(("\\.pm$\\'" . pollen-mode)))
64-
63+
'(("\\.p$'" . pollen-mode)
64+
("\\.pp$'" . pollen-mode)
65+
("\\.pm$" . pollen-mode)
66+
("\\.pmd$" . pollen-mode)
67+
("\\.ptree$" . pollen-mode)))
6568

6669
(provide 'pollen)

0 commit comments

Comments
 (0)