[Omake] bug with ocamldep?
Christopher L Conway
cconway at cs.nyu.edu
Wed Jun 20 13:54:30 PDT 2007
Anastasia,
The following may suit you.
(defun make-or-omake ()
(interactive)
(if (file-exists-p "OMakefile")
(set (make-local-variable 'compile-command) "omake -k "))
(call-interactively 'compile) )
(add-hook 'tuareg-mode-hook
(lambda ()
(define-key (current-local-map) "\C-c\C-c" 'make-or-omake))))
The first defines a function which you can invoke using "M-x
make-or-omake". The second replaces the "C-c C-c" binding in tuareg
mode with a call to this new function.
I'll second David's tip to run omake with -w. Emacs is generally
pretty clever about finding error lines, so long as the build tool
outputs something sensible.
You'll probably also want to run omake with --no--progress, or your
compilation buffer will be hideous.
Regards,
Chris
On 6/20/07, Anastasia Gornostaeva <ermine at ermine.pp.ru> wrote:
> On Wed, Jun 20, 2007 at 10:37:24AM -0400, Christopher L Conway wrote:
> > Anastasia,
> >
> > What do you mean by "integrate"? An omake-mode with syntax and
> > indentation support? Or a function that will invoke omake for you from
> > within emacs? If you mean the former, you're out of luck. If you mean
> > the latter, here's a really cut-rate emacs hack for you:
> > (setq-default compile-command "omake")
> >
> > Now "M-x compile" will invoke omake instead of make. You can also put
> > do this at a buffer-local level, which is what I typically do. E.g.,
> > put the following at the end of an OCaml source file:
>
> Yes, i want the compilation and linking to error locations.
> But such command shoul depend on which makefile used in current directory -
> Makefile or OMakefile. Could you append some lines for it for .emacs?
>
> ermine
> _______________________________________________
> Omake mailing list
> Omake at metaprl.org
> https://lists.metaprl.org/mailman/listinfo/omake
>
>
More information about the Omake
mailing list