- Subject: Re: Folding & Perl Mode
- From: "John E. Davis" <davis@xxxxxxxxxxxxx>
- Date: Wed, 20 Jun 2007 23:32:21 -0400
Thei Wijnen <t.wijnen@xxxxxxxxx> wrote:
>Here are my changes to perl.sl and they appear to work!
Here is a different patch that I believe will work with both forms of
the fold marks. Please let me know if this breaks something. Thanks,
--John
Index: perl.sl
===================================================================
--- perl.sl (revision 52)
+++ perl.sl (working copy)
@@ -436,6 +436,22 @@
return rc;
}
+private define find_matching_brace_ignore_fold_marks (endch);
+private define find_matching_brace_ignore_fold_marks (endch)
+{
+ variable m = create_user_mark ();
+ if (1 != find_matching_delimiter (endch))
+ return 0;
+ !if (blooking_at ("#{{") or blooking_at ("# {{"))
+ return 1;
+ go_left(2);
+ if (1 == find_matching_brace_ignore_fold_marks (endch))
+ return 1;
+
+ goto_user_mark (m);
+ return 0;
+}
+
%!%+
%\function{perl_indent_line}
%\synopsis{Void perl_indent_line (Void)}
@@ -530,10 +546,7 @@
% --------------------------------------------------------------------
endch = '}';
if (ch == '{') indent_ok++;
- if (andelse
- {find_matching_delimiter(endch) == 1}
- {not( blooking_at("#{{") ) } % don't match '#{{{' fold
- )
+ if (find_matching_brace_ignore_fold_marks (endch))
{
extra_indent = Perl_Indent;
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2007 date index]
[2007 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]