Loading ...
Sorry, an error occurred while loading the content.
 

[PATCH] suspend command doesn't work

Expand Messages
  • Georg Neis
    Hallo, the suspend ex command doesn t work: bad command sus The following patch fixes this: diff -urN elvis-2.2_0-gn2/ex.c elvis-2.2_0-gn3/ex.c ... +++
    Message 1 of 2 , Mar 3, 2004
      Hallo,

      the suspend ex command doesn't work: "bad command sus"
      The following patch fixes this:

      diff -urN elvis-2.2_0-gn2/ex.c elvis-2.2_0-gn3/ex.c
      --- elvis-2.2_0-gn2/ex.c Sun Feb 29 13:45:16 2004
      +++ elvis-2.2_0-gn3/ex.c Wed Mar 3 11:57:57 2004
      @@ -251,6 +251,7 @@
      #endif
      /*rew */{"rewind", EX_REWIND, ex_next, a_Bang, q_Unsafe | q_SwitchB },
      /*s */{"substitute", EX_SUBSTITUTE, ex_substitute, a_Range|a_RegExp|a_RegSub|a_Rhs|a_Count|a_Pflag, q_Autop|q_Undo|q_Exrc },
      +/*sus */{"suspend", EX_SUSPEND, ex_suspend, a_Bang, q_Unsafe | q_Restricted },
      #ifdef FEATURE_SPLIT
      /*sN */{"sNext", EX_SPREVIOUS, ex_next, 0, q_Unsafe },
      /*sa */{"sall", EX_SALL, ex_sall, 0 },
      @@ -281,7 +282,6 @@
      #ifdef FEATURE_MISC
      /*stac*/{"stack", EX_STACK, ex_stack, d_None },
      #endif
      -/*su */{"suspend", EX_SUSPEND, ex_suspend, a_Bang, q_Unsafe | q_Restricted },
      #ifdef FEATURE_CALC
      /*sw */{"switch", EX_SWITCH, ex_switch, a_Cmds, q_Exrc },
      #endif

      I hope that doesn't break something else.

      Also note that I changed the comment to "sus" because "su" still
      matches the substitute command (the documentation is correct:
      sus[pend][!]). However, SUSv2[1] says that it should be
      su[spend][!].

      [1] http://www.opengroup.org/onlinepubs/007904975/utilities/ex.html


      Another small correction:

      diff -urN elvis-2.2_0-gn2/doc/elvisex.html elvis-2.2_0-gn3/doc/elvisex.html
      --- elvis-2.2_0-gn2/doc/elvisex.html Sun Feb 29 13:58:54 2004
      +++ elvis-2.2_0-gn3/doc/elvisex.html Wed Mar 3 12:11:52 2004
      @@ -1221,7 +1221,7 @@
      The <code>:qall</code> command tries to close all of the windows at once.
      It is equivalent to giving the <code>:quit</code> command in each window.

      -<dt><a name="preserve">pre[serve]</a>
      +<dt><a name="preserve">pres[erve]</a>
      <dd>
      The <code>:preserve</code> command closes all windows and exits, but it doesn't
      delete the session file.

      :pre matches 'previous', not 'preserve'.

      Gruß, Georg
      --
      Calling elvis
      Is anybody home
      Calling elvis
      I'm here all alone --Dire Straits (Calling elvis)
    • Serge Pirotte
      I was also wondering, in the gui versions of elvis, shouldn t the suspend command just minimize the elvis window instead of starting a new shell? This would
      Message 2 of 2 , Mar 5, 2004
        I was also wondering, in the gui versions of elvis, shouldn't the
        suspend command just minimize the elvis window instead of starting a
        new shell?
        This would make more sense to me. The intent of suspend is to get
        control again, not to start a shell.

        Regards,
        Serge Pirotte

        --- In elvis-editor@yahoogroups.com, Georg Neis <georg@f...> wrote:
        > Hallo,
        >
        > the suspend ex command doesn't work: "bad command sus"
        > The following patch fixes this:
        >
        > diff -urN elvis-2.2_0-gn2/ex.c elvis-2.2_0-gn3/ex.c
        > --- elvis-2.2_0-gn2/ex.c Sun Feb 29 13:45:16 2004
        > +++ elvis-2.2_0-gn3/ex.c Wed Mar 3 11:57:57 2004
        > @@ -251,6 +251,7 @@
        > #endif
        > /*rew */{"rewind", EX_REWIND, ex_next, a_Bang,
        q_Unsafe | q_SwitchB },
        > /*s */{"substitute", EX_SUBSTITUTE, ex_substitute,
        a_Range|a_RegExp|a_RegSub|a_Rhs|a_Count|a_Pflag,
        q_Autop|q_Undo|q_Exrc },
        > +/*sus */{"suspend", EX_SUSPEND, ex_suspend, a_Bang,
        q_Unsafe | q_Restricted },
        > #ifdef FEATURE_SPLIT
        > /*sN */{"sNext", EX_SPREVIOUS, ex_next, 0,
        q_Unsafe },
        > /*sa */{"sall", EX_SALL, ex_sall, 0
        },
        > @@ -281,7 +282,6 @@
        > #ifdef FEATURE_MISC
        > /*stac*/{"stack", EX_STACK, ex_stack, d_None
        },
        > #endif
        > -/*su */{"suspend", EX_SUSPEND, ex_suspend, a_Bang,
        q_Unsafe | q_Restricted },
        > #ifdef FEATURE_CALC
        > /*sw */{"switch", EX_SWITCH, ex_switch, a_Cmds,
        q_Exrc },
        > #endif
        >
        > I hope that doesn't break something else.
        >
        > Also note that I changed the comment to "sus" because "su" still
        > matches the substitute command (the documentation is correct:
        > sus[pend][!]). However, SUSv2[1] says that it should be
        > su[spend][!].
        >
        > [1] http://www.opengroup.org/onlinepubs/007904975/utilities/ex.html
        >
        >
        > Another small correction:
        >
        > diff -urN elvis-2.2_0-gn2/doc/elvisex.html elvis-2.2_0-
        gn3/doc/elvisex.html
        > --- elvis-2.2_0-gn2/doc/elvisex.html Sun Feb 29 13:58:54 2004
        > +++ elvis-2.2_0-gn3/doc/elvisex.html Wed Mar 3 12:11:52 2004
        > @@ -1221,7 +1221,7 @@
        > The <code>:qall</code> command tries to close all of the windows
        at once.
        > It is equivalent to giving the <code>:quit</code> command in each
        window.
        >
        > -<dt><a name="preserve">pre[serve]</a>
        > +<dt><a name="preserve">pres[erve]</a>
        > <dd>
        > The <code>:preserve</code> command closes all windows and exits,
        but it doesn't
        > delete the session file.
        >
        > :pre matches 'previous', not 'preserve'.
        >
        > Gruß, Georg
        > --
        > Calling elvis
        > Is anybody home
        > Calling elvis
        > I'm here all alone --Dire Straits (Calling elvis)
      Your message has been successfully submitted and would be delivered to recipients shortly.