GNU bug report logs - #21762
24.5; python.el indentation error

Previous Next

Package: emacs;

Reported by: "Dixon Ryan (ETAS/ERS-PD2)" <Ryan.Dixon <at> etas.com>

Date: Mon, 26 Oct 2015 14:19:02 UTC

Severity: normal

Tags: confirmed

Merged with 21708, 23778

Found in versions 24.5, 25.0.50

Fixed in version 25.1

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juanma Barranquero <lekktu <at> gmail.com>
To: "Dixon Ryan (ETAS/ERS-PD2)" <Ryan.Dixon <at> etas.com>
Cc: Fabián E. Gallina <fgallina <at> gnu.org>, 21762 <at> debbugs.gnu.org
Subject: bug#21762: 24.5; python.el indentation error
Date: Wed, 28 Oct 2015 11:56:59 +0100
[Message part 1 (text/plain, inline)]
On Mon, Oct 26, 2015 at 1:00 PM, Dixon Ryan (ETAS/ERS-PD2) <
Ryan.Dixon <at> 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")
[Message part 2 (text/html, inline)]

This bug report was last modified 9 years and 30 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.