emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/smalltalk-mode a7e8c36 14/34: fix smalltalk-scope-begin


From: Stefan Monnier
Subject: [elpa] externals/smalltalk-mode a7e8c36 14/34: fix smalltalk-scope-begin-of-defun
Date: Tue, 9 Apr 2019 22:30:43 -0400 (EDT)

branch: externals/smalltalk-mode
commit a7e8c36f2b34685b9e3b03e776d46111264c2f50
Author: Mathieu Suen <address@hidden>
Commit: Paolo Bonzini <address@hidden>

    fix smalltalk-scope-begin-of-defun
---
 smalltalk-mode.el | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/smalltalk-mode.el b/smalltalk-mode.el
index 20c9fa7..2e84435 100644
--- a/smalltalk-mode.el
+++ b/smalltalk-mode.el
@@ -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 ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]