aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 226d4bdc62d..e57c7e639c9 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -981,11 +981,15 @@ don't move and return nil. Otherwise return t."
981 (_ (if (python-comment-line-p) 981 (_ (if (python-comment-line-p)
982 (python-skip-comments/blanks t))) 982 (python-skip-comments/blanks t)))
983 (ci (current-indentation)) 983 (ci (current-indentation))
984 (open (python-open-block-statement-p))) 984 (open (python-open-block-statement-p))
985 opoint)
985 (if (and (zerop ci) (not open)) 986 (if (and (zerop ci) (not open))
986 (not (goto-char point)) 987 (not (goto-char point))
987 (catch 'done 988 (catch 'done
988 (while (zerop (python-next-statement)) 989 (setq opoint (point))
990 (while (and (zerop (python-next-statement))
991 (not (= opoint (point))))
992 (setq opoint (point))
989 (when (or (and open (<= (current-indentation) ci)) 993 (when (or (and open (<= (current-indentation) ci))
990 (< (current-indentation) ci)) 994 (< (current-indentation) ci))
991 (python-skip-comments/blanks t) 995 (python-skip-comments/blanks t)
@@ -2225,6 +2229,7 @@ with skeleton expansions for compound statement templates.
2225 ;; . python-font-lock-syntactic-face-function) 2229 ;; . python-font-lock-syntactic-face-function)
2226 )) 2230 ))
2227 (set (make-local-variable 'parse-sexp-lookup-properties) t) 2231 (set (make-local-variable 'parse-sexp-lookup-properties) t)
2232 (set (make-local-variable 'parse-sexp-ignore-comments) t)
2228 (set (make-local-variable 'comment-start) "# ") 2233 (set (make-local-variable 'comment-start) "# ")
2229 (set (make-local-variable 'indent-line-function) #'python-indent-line) 2234 (set (make-local-variable 'indent-line-function) #'python-indent-line)
2230 (set (make-local-variable 'indent-region-function) #'python-indent-region) 2235 (set (make-local-variable 'indent-region-function) #'python-indent-region)