Re: region sensitive Makefile compile-command
Juri Linkov <juri <at> jurta.org>
2004-12-01 20:37:52 GMT
Dan Jacobson <jidanni <at> jidanni.org> writes:
> You guys just got to implement this, so I'm rereqesting it as it is so
> cool. Make a new variable that we can turn on to enable this:
>
> Here we are in a Makefile,
> a:
> bla bla
> b:
> bla bla
>
> Well, if the cursor is anywhere in the a: region, all two lines of it,
> then compile-command should be "make a" (or "make -k a"). If anywhere
> in the b: region, then compile-command should be "make b".
>
> That way when one hits M-x compile, one gets prompted with something
> relevant, not just "make -k" which may not always be what you want.
>
> Currently sadly, one can even put the cursor right on top of the a:
> and normally highly sensitive emacs (especially after enabling ffap)
> still doesn't get the hint.
Good idea. How about such patch? However, it doesn't provide
a simple option to turn this off. I wonder if someone might not like
this behavior?
Index: lisp/progmodes/make-mode.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/make-mode.el,v
retrieving revision 1.88
diff -u -r1.88 make-mode.el
(Continue reading)