[EMAIL PROTECTED] (Jürgen Spitzmüller) writes:

> Jean-Marc Lasgouttes wrote:
>> Here is a patch that implements proper functionning of M-Return (at
>> least as I see it: like Return, but inverting role of environment and
>> non-environment). I'd be interested to have some feedback on it. This
>> is potentially for trunk and branch.
>
> Could you describe shortly what this does (as opposed to the current 
> situation)?

Note that the difference is only important when the cursor is at the
end of the paragraph. For breaking paragraphs in their middle, there
is not difference between Return and M-Return.

The behaviour of return is unchanged:

  * if layout is an environment, keep layout and depth intact

  * if layout is a command

    - if depth > 0, decrease it by one and use the layout of the
      enclosing environment.

    - if depth = 0, set layout to defaultLayout


The behaviour of M-Return is the exact symmetry of what Return would
do:

  * if layout is a command, keep layout and depth intact

  * if layout is an environment,

    - if depth > 0, decrease it by one and use the layout of the
      enclosing environment.

    - if depth = 0, set layout to defaultLayout


Actually, it could be renamed to something like
break-paragraph-special, or an 'inverse' option could be added to
break-paragraph.

I am not sure that I want to apply the patch for 1.5.2 actually. I
would like to tinker with it a bit more: when typing Return (or
M-Return) in an empty paragraph (with keepempty not set), we should
use the procedure described for Return/command to decrease the depth.
This would allow to go out of nested enumeration by successive
pressing of Return.

JMarc

Reply via email to