Xemacs ../ebin and ../include
Mats Cronqvist (ÄL2/EAB)
mats.cronqvist@REDACTED
Thu Sep 25 15:50:46 CEST 2003
here's a snip from my .emacs. when issuing the emacs compile command it does "make -k" if there is a Makefile, otherwise runs "erlc +debug_info -W", adding the -o and/or -I switches if "../ebin" and/or "../inc "exists. apologies for the un-stylish lisp.
mats
(add-hook 'erlang-mode-hook 'my-erlang-mode-hook)
(defun my-erlang-mode-hook ()
(unless (null buffer-file-name)
(make-local-variable 'compile-command)
(setq compile-command
(if (file-exists-p "Makefile") "make -k"
(concat
(concat
"erlc "
(concat
(if (file-exists-p "../ebin") "-o ../ebin " "")
(if (file-exists-p "../inc") "-I ../inc " ""))
"+debug_info -W " buffer-file-name))))))
More information about the erlang-questions
mailing list