After installing emacs on windows 10 and gone through the tutorial and downloaded a major mode mt4.el , Now where to save it and how to use it in emacs?

googling did not help me.

  • You will need to place this short gist of a major-mode in your .emacs path. and then 'require it in your config. read all about it in major-modes. you can run try out and evaluate this short code in the scratch buffer before. – manandearth Jun 9 '18 at 12:06

Find the package-user-dir with F1 v package-user-dir or M-x describe-variable <RET> package-user-dir.
Create the folder mt4-mode in the given package-user-dir.
Put a copy of the mt4.el file in that folder and edit the mql-compiler command to be correct for Windows (i.e., without wine.)
Run the mode with M-x mt4-mode or by C-x C-f example.mt4 or M-x find-file example.mt4.

  • After following your instructions, now the compiler command looks like this (defvar mql-compiler "/Users/myName/Applications/Wineskin/MetaTrader 4.app/drive_c/Program Files/BTC-e Exchange MT4/metaeditor.exe'") but I could not locate the file metaeditor.exe in my windows 10, in emacs M-x mt4-mode gives [No Match], any suggestions? – samjesse Jun 11 '18 at 2:11
  • Found it and updated the command to the location for no avail. `(defvar mql-compiler "C:\Program Files (x86)\Broker name\metaeditor.exe") – samjesse Jun 11 '18 at 3:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.