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

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

[elpa] externals/smalltalk-mode 320dcae 15/34: fix indent and smalltalk-


From: Stefan Monnier
Subject: [elpa] externals/smalltalk-mode 320dcae 15/34: fix indent and smalltalk-at-begin-of-{defun|scope}
Date: Tue, 9 Apr 2019 22:30:43 -0400 (EDT)

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

    fix indent and smalltalk-at-begin-of-{defun|scope}
---
 smalltalk-mode.el | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/smalltalk-mode.el b/smalltalk-mode.el
index 2e84435..3581e6d 100644
--- a/smalltalk-mode.el
+++ b/smalltalk-mode.el
@@ -267,10 +267,10 @@
                         (progn
                           (forward-sexp 1)
                           (if (and (< (point) here)
-                               (= (char-before) ?]))
-                            (progn 
-                              (skip-syntax-forward " \t")
-                              (setq prev (point)))))
+                                   (= (char-before) ?\]))
+                              (progn 
+                                (skip-syntax-forward " \t")
+                                (setq prev (point)))))
                       (error t))
                     (goto-char prev)
                     (beginning-of-line)
@@ -753,9 +753,9 @@ following on the same line."
          (and (bolp)
               (progn (smalltalk-backward-whitespace)
                      (= (preceding-char) ?!))))
-      (= (line-number-at-pos)
-        (progn (smalltalk-begin-of-scope)
-               (line-number-at-pos))))))
+      (let ((curr-line-pos (line-number-at-pos)))
+       (if (smalltalk-begin-of-scope)
+           (= curr-line-pos (line-number-at-pos)))))))
 
 (defun smalltalk-at-begin-of-defun ()
   "Returns T if at the beginning of a method definition, otherwise nil"
@@ -766,10 +766,9 @@ following on the same line."
          (and (bolp)
               (progn (smalltalk-backward-whitespace)
                      (= (preceding-char) ?!))))
-      (= (line-number-at-pos)
-        (progn (smalltalk-begin-of-defun)
-               (line-number-at-pos))))))
-
+      (let ((curr-line-pos (line-number-at-pos)))
+       (if (smalltalk-begin-of-defun)
+           (= curr-line-pos (line-number-at-pos)))))))
 
 (defun smalltalk-indent-for-colon ()
   (let (indent-amount c start-line state done default-amount



reply via email to

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