add :edit to the release notes, and improve the docs a bit
authorSimon Marlow <simonmar@microsoft.com>
Fri, 29 Sep 2006 11:21:08 +0000 (11:21 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Fri, 29 Sep 2006 11:21:08 +0000 (11:21 +0000)
docs/users_guide/6.6-notes.xml
docs/users_guide/ghci.xml

index aaf8ddd..55065dc 100644 (file)
       </listitem>
       <listitem>
         <para>
+          GHCi now has an <literal>:edit</literal> command which pops
+          up an editor on the most recently loaded file, or a
+          specified file.  See <xref linkend="ghci-commands" /> for
+          more information.
+        </para>
+      </listitem>
+      <listitem>
+        <para>
           GHCi now invokes <literal>print</literal> by default on the
           result of IO actions and bindings at the prompt.  This is
           occasionally not what you want, so it can be disabled (at
index 76d4972..749b4d6 100644 (file)
@@ -49,6 +49,8 @@ Prelude>
    :browse [*]&lt;module&gt;         display the names defined by &lt;module&gt;
    :cd &lt;dir&gt;                   change directory to &lt;dir&gt;
    :def &lt;cmd&gt; &lt;expr&gt;           define a command :&lt;cmd&gt;
+   :edit &lt;file&gt;                edit file
+   :edit                       edit last module
    :help, :?                   display this list of commands
    :info [&lt;name&gt; ...]          display information about the given names
    :load &lt;filename&gt; ...        load module(s) and their dependents
@@ -60,6 +62,7 @@ Prelude>
    :set args &lt;arg&gt; ...         set the arguments returned by System.getArgs
    :set prog &lt;progname&gt;        set the value returned by System.getProgName
    :set prompt &lt;prompt&gt;        set the prompt used in GHCi
+   :set editor &lt;cmd&gt;        set the command used for :edit
 
    :show modules               show the currently loaded modules
    :show bindings              show the current bindings made at the prompt
@@ -1022,7 +1025,8 @@ Prelude> :. cmds.ghci
          module if <replaceable>file</replaceable> is omitted.  The
          editor to invoke is taken from the <literal>EDITOR</literal>
          environment variable, or a default editor on your system if
-         <literal>EDITOR</literal> is not set.</para>
+         <literal>EDITOR</literal> is not set.  You can change the
+         editor using <literal>:set editor</literal>.</para>
        </listitem>
       </varlistentry>
 
@@ -1193,6 +1197,16 @@ Prelude> :main foo bar
 
       <varlistentry>
        <term>
+           <literal>:set</literal> <literal>editor</literal> <replaceable>cmd</replaceable>
+        </term>
+       <listitem>
+         <para>Sets the command used by <literal>:edit</literal> to
+         <replaceable>cmd</replaceable>.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
            <literal>:set</literal> <literal>prog</literal> <replaceable>prog</replaceable>
            <indexterm><primary><literal>:set prog</literal></primary></indexterm>
         </term>