我下載了nxhtml並將其解壓縮。然後我把它放在我的.emacs文件中。每次打開.html.erb文件時,都會設置eruby-nxhtml-mumamo-mode
(add-to-list 'load-path "~/nxhtml/util")
(require 'mumamo-fun)
(setq mumamo-chunk-coloring 'submode-colored)
(add-to-list 'auto-mode-alist '("\\.rhtml\\'" . eruby-nxhtml-mumamo-mode))
(add-to-list 'auto-mode-alist '("\\.html\\.erb\\'" . eruby-nxhtml-mumamo-mode))
當我打開.html.erb文件時,它沒有正確的模式設置(因此語法突出顯示不正確)。我知道require語句正確運行b/c我可以手動將aquamacs設置爲eruby-nxhtml-mumamo-mode,如果我註釋掉require行,我甚至不能切換到該模式。我甚至嘗試用其他模式替換eruby ...-模式,例如C++模式和我知道工作的其他模式,這也不起作用。
所以是我的問題與正則表達式?我不確定。任何幫助,將不勝感激。
我看不出你的代碼有什麼問題,並且實驗證明它適用於我(指定了不同的模式)。當你說你不是以適當的模式結束時,你最終會進入哪種模式?也許另一個映射優先。 – phils 2012-05-03 06:58:49