jed-users mailing list

[2006 Date Index] [2006 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

bug in SLang mode: if, for and while are listed as functions


Hi,

#! /bin/sh /usr/share/dpatch/dpatch-run
## slmode-function-popup.dpatch by Jörg Sommer <joerg@xxxxxxxxxxxx>
##
## DP: In SLang mode the menu Mode->Functions includes if, while or for if they
## DP: occur outside of a function (which is valid).

@DPATCH@
diff -urNad branches~/lib/cmode.sl branches/lib/cmode.sl
--- branches~/lib/cmode.sl	2006-02-13 18:51:58.000000000 +0100
+++ branches/lib/cmode.sl	2006-07-28 15:11:14.298231102 +0200
@@ -1057,7 +1057,13 @@
 	       continue;
 
 	     c_bskip_over_comment (1);
-	     names[bextract_identifier ()] = what_line ();
+
+             % In SLang you can write statements at the same level like
+             % functions they look like functions but aren't it.
+             variable id = bextract_identifier ();
+             switch (id)
+             { case "if" or case "while" or case "for": }
+             { names[id] = what_line (); }
 	  }
      }
 }

Bye, Jörg.
-- 
Der Hase läuft schneller als der Fuchs,
denn der Hase läuft um sein Leben.

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2006 date index] [2006 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]