On Mon, Oct 26, 2015 at 1:00 PM, Dixon Ryan (ETAS/ERS-PD2) <Ryan.Dixon@etas.com> wrote:

> import re as myre
> var = [
> %
>
> vii. I then press TAB and get the minibuffer message: Wrong type argument: number-or-marker-p, nil

Yes, reproducible in 25.0.50. `python-syntax-closing-paren-p' needs to cater for the case that there is no syntax after point...

Perhaps something like this. Fabian?


diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 6ff12b5..96342e5 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -490,8 +490,8 @@ python-syntax-comment-or-string-p
 
 (defsubst python-syntax-closing-paren-p ()
   "Return non-nil if char after point is a closing paren."
-  (= (syntax-class (syntax-after (point)))
-     (syntax-class (string-to-syntax ")"))))
+  (equal (syntax-class (syntax-after (point)))
+      (syntax-class (string-to-syntax ")"))))
 
 (define-obsolete-function-alias
   'python-info-ppss-context #'python-syntax-context "24.3")