hinrik / perl6-mode

Emacs major mode for Perl 6
GNU General Public License v3.0
36 stars 4 forks source link

indent fails after "=begin comment" #6

Closed tbrowder closed 7 years ago

tbrowder commented 8 years ago

I got my desired indentation (2 spaces) working with the "perl6-mode"--thanks!

When I have code like this

if %h{$fil}:exists { =begin comment if $fsiz > %h{$fil} { %h{$fil} = $dir; %h{$fil} = $fsiz; } =end comment ``` if $mtime_inst > %h{$fil} { %h{$fil} = $dir; %h{$fil} = $mtime; } ```

The appropriate indentation for the Perl 6 code is also applied to the "=begin comment" and "=end comment" lines. On those lines we need to make indentation zero.

tbrowder commented 8 years ago

I forgot to use markdown on the code block. This looks like my code now:

    if %h{$fil}:exists {
      =begin comment
      if $fsiz > %h{$fil}<siz> {
        %h{$fil}<dir> = $dir;
        %h{$fil}<siz> = $fsiz;
      }
      =end comment
      if $mtime_inst > %h{$fil}<mtime> {
        %h{$fil}<dir>   = $dir;
        %h{$fil}<mtime> = $mtime;
      }
    }
tbrowder commented 8 years ago

I didn't mean to close the issue--sorry.

tbrowder commented 7 years ago

As I have gained experience with P6, I realize the indentation is a good thing since it doesn't negate the effect of the statements as in P5. Thus I am closing this issue.