Hi Paolo

I manage to fix the bug.
See the attached file.

You can also take it from my github repository:
git://github.com/mathk/smalltalk.git

Let me know if that is ok.

Thanks



> De : Paolo Bonzini <[email protected]>
> 
> >>> This is because the  #'smalltalk-narrow-to-method will narrow  to:
> >>>
> >>>   -----------------
> >>>  ]
> >>>
> >>>       bar
> >>>    -----------------
> >>>
> >>> So we need to check before if  we are in a  message pattern for the new
> >>  syntax.
> >>
> >> Or maybe the narrowing is  wrong.   I'll look at it in the next few days
> >> if you don't beat   me...
> >>
> >> Paolo
> >
> > The narrowing function is  using  smalltalk-scope-begin-of-defun.
> > What is the purpose of   smalltalk-scope-begin-of-defun?
> >
> > Is it to move point at the  beginning of the message patern ?
> 
> Yes.
> 
> Paolo
> 


      
diff --git a/20c9fa7 b/2e84435
index 20c9fa7..2e84435 100644
--- a/20c9fa7
+++ b/2e84435
@@ -261,9 +261,20 @@
 		     (forward-sexp 1))
 		 (error t))
 	       (if prev
-		   (progn (goto-char prev)
-			  (beginning-of-line)
-			  (skip-chars-forward " \t"))
+		   (progn
+		     (goto-char prev)
+		     (condition-case nil
+			 (progn
+			   (forward-sexp 1)
+			   (if (and (< (point) here)
+				(= (char-before) ?]))
+			     (progn 
+			       (skip-syntax-forward " \t")
+			       (setq prev (point)))))
+		       (error t))
+		     (goto-char prev)
+		     (beginning-of-line)
+		     (skip-chars-forward " \t"))
 		 (goto-char start))))))
 
 (defun smalltalk-begin-of-defun ()
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to