emacs带参启动erlang模式会出现错误:
apply: Searching for program: no such file or directory, sh
原因是windows下没有sh,解决方法,修改erl5.9.2\lib\tools-2.6.8\emacs\erlang.el中
(;; setq cmd "sh"
;; opts (list "-c" command)将前两行注释掉
setq cmd "erl" ;;在windows下使用erl
opts (let ((start 0) ;;将windows下的输入组合成符合要求的命令串
(str command)
(cmdcon '()))
(while (string-match " " str start)
(setq cmdcon (cons (substring str start (match-beginning 0)) cmdcon))
(setq start (match-end 0)))
(setq cmdcon (cons (substring str (match-end 0)) cmdcon))
(reverse cmdcon)))