csvemacscoqproof-general

How to tell Proof General that ".csv" != ".v"


Every time I open a .csv file in an Emacs buffer, Proof General starts up (unless it's already started) and resets my windows. This really throws off my Emacs groove and needs to stop.

The only part of my init.el that deals with Proof General is this:

(load-file "~/.emacs.d/ProofGeneral-4.2/generic/proof-site.el")
(setq auto-mode-alist (cons '("\.v$" . coq-mode) auto-mode-alist))
(autoload 'coq-mode "coq" "Major mode for editing Coq vernacular." t)

Solution

  • Your regex to match names is after initial string translation .v$ because single backslash escape belongs to the string reader. As a result, every name that has atleast two characters and the last one is a v, is assigned to coq-mode.

    The fix is easy: use double backslashes in the pattern.