Browse Source

Shell snippet that autodetects Emacs' compile mode and then passes

-emacs as well as build.compiler.emacs to Ant.

PR: 11056, 11057
Submitted by:	Ville Skytt� <ville.skytta@iki.fi>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273184 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 23 years ago
parent
commit
e9029b083b
3 changed files with 51 additions and 11 deletions
  1. +31
    -3
      docs/faq.html
  2. +5
    -5
      docs/projects.html
  3. +15
    -3
      xdocs/faq.xml

+ 31
- 3
docs/faq.html View File

@@ -1353,9 +1353,37 @@ shell-prompt&gt; cat &lt; foo
regular expressions in your editor that would account for regular expressions in your editor that would account for
this.</p> this.</p>
<p>You can disable this banner by invoking Ant with the <p>You can disable this banner by invoking Ant with the
<code>-emacs</code> switch. Alternatively, you can add the
following snippet to your <code>.emacs</code> to make Emacs
understand Ant's output.</p>
<code>-emacs</code> switch. To make Ant autodetect
Emacs' compile mode, put this into your
<code>.antrc</code> (contributed by Ville Skyttä).</p>
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>
# Detect (X)Emacs compile mode
if [ &quot;$EMACS&quot; = &quot;t&quot; ] ; then
ANT_ARGS=&quot;$ANT_ARGS -emacs&quot;
ANT_OPTS=&quot;$ANT_OPTS -Dbuild.compiler.emacs=true&quot;
fi
</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
<p>Alternatively, you can add the following snippet to your
<code>.emacs</code> to make Emacs understand Ant's
output.</p>
<div align="left"> <div align="left">
<table cellspacing="4" cellpadding="0" border="0"> <table cellspacing="4" cellpadding="0" border="0">
<tr> <tr>


+ 5
- 5
docs/projects.html View File

@@ -188,12 +188,12 @@
<tr><td> <tr><td>
<blockquote> <blockquote>
<p>AntDoc is a tool that generates HTML documentation from Ant <p>AntDoc is a tool that generates HTML documentation from Ant
buildfiles; the generated HTML is inspired from what javadoc
yields. It also offers a simple Ant target launcher named
AntDoc GUI. Ant targets may be launched from the generated
AntDoc HTML pages.</p>
buildfiles; the generated HTML is inspired from what javadoc
yields. It also offers a simple Ant target launcher named
AntDoc GUI. Ant targets may be launched from the generated
AntDoc HTML pages.</p>
<p>AntDoc can be run via an Ant task, AntDoc GUI can be run <p>AntDoc can be run via an Ant task, AntDoc GUI can be run
via an Ant task, or via a JVM launch.</p>
via an Ant task, or via a JVM launch.</p>
<table> <table>
<tr> <tr>
<td bgcolor="#039acc" colspan="" rowspan="" <td bgcolor="#039acc" colspan="" rowspan=""


+ 15
- 3
xdocs/faq.xml View File

@@ -612,9 +612,21 @@ shell-prompt> cat < foo
this.</p> this.</p>


<p>You can disable this banner by invoking Ant with the <p>You can disable this banner by invoking Ant with the
<code>-emacs</code> switch. Alternatively, you can add the
following snippet to your <code>.emacs</code> to make Emacs
understand Ant&apos;s output.</p>
<code>-emacs</code> switch. To make Ant autodetect
Emacs&apos; compile mode, put this into your
<code>.antrc</code> (contributed by Ville Skytt&#228;).</p>

<source><![CDATA[
# Detect (X)Emacs compile mode
if [ "$EMACS" = "t" ] ; then
ANT_ARGS="$ANT_ARGS -emacs"
ANT_OPTS="$ANT_OPTS -Dbuild.compiler.emacs=true"
fi
]]></source>

<p>Alternatively, you can add the following snippet to your
<code>.emacs</code> to make Emacs understand Ant&apos;s
output.</p>


<source><![CDATA[ <source><![CDATA[
(require 'compile) (require 'compile)


Loading…
Cancel
Save