2012-03-08 43 views

回答

4

你將不得不覆蓋自動模式ALIST在你的.emacs或諸如此類的東西的結合。

這SO後確實與VHDL類似的東西:

How do I turn off vhdl-mode in emacs?

另外,我用Google搜索 「自動模式ALIST刪除」,發現this link。複製/粘貼了重要的一點:

;; Remove all annoying modes from auto mode lists 

(defun replace-alist-mode (alist oldmode newmode) 
    (dolist (aitem alist) 
    (if (eq (cdr aitem) oldmode) 
    (setcdr aitem newmode)))) 

;; not sure what mode you want here. You could default to 'fundamental-mode 
(replace-alist-mode auto-mode-alist 'verilog-mode 'proof-general-mode) 
+0

剛剛發現這個太多,但我會接受你的冗長和參考)。 – Peteris 2012-03-08 21:49:29

2

我對ProofGeneral並不熟悉,但是如果我正確理解您的問題,則需要修改auto-mode-alist變量,以將正確的專業與帶有.v擴展名的文件相關聯。所以,你需要像這樣添加到您的.emacs文件:

(add-to-list 'auto-mode-alist '("\\.v$" . proof-general-coq-mode)) 
1

下面這行的工作:

(setq auto-mode-alist (remove (rassoc 'verilog-mode auto-mode-alist) auto-mode-alist))