I use both web-mode and racket-mode often. I am also using Pollen, a Racket language for processing text. Pollen uses compound file extensions like:
pynchon.html.pm stephenson.css.pp wallace.html.pmd
The relevant extensions are
web-mode grabs onto these file extensions due the
html portions on the extension. I would like it to stop doing that. I would like these files to be opened in racket-mode.
This is what I have tried so far in my
default.el file (I am using prelude):
;; web-mode (require 'web-mode) (defun my-web-mode-hook () "Hooks for Web mode." (add-to-list 'auto-mode-alist '("\\.p[mp]\\'" ignore t)) (add-to-list 'auto-mode-alist '("\\.pmd\\'" ignore t))) (add-hook 'web-mode-hook 'my-web-mode-hook) ;; racket-mode (require 'racket-mode) (defun racket-mode-hook () (add-to-list 'auto-mode-alist '("\\.p[mp]\\'" . racket-mode)) (add-to-list 'auto-mode-alist '("\\.pmd\\'" . racket-mode))) (add-hook 'racket-mode-hook 'racket-mode-hook)
Unfortunately my pollen files with an
html extension (ex:
pynchon.html.pm) still open in html-mode and my pollen files with a
pp extension open in puppet-mode.