From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#21762: 24.5; python.el indentation error Date: Wed, 28 Oct 2015 11:56:59 +0100 Message-ID: References: <500758cc17b5439597082f0f9214972f@FE-MBX1012.de.bosch.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c3f5c4190b5b0523281068 X-Trace: ger.gmane.org 1446029904 11854 80.91.229.3 (28 Oct 2015 10:58:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Oct 2015 10:58:24 +0000 (UTC) Cc: 21762@debbugs.gnu.org To: "Dixon Ryan (ETAS/ERS-PD2)" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 28 11:58:15 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZrOQn-00036Q-P7 for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Oct 2015 11:58:14 +0100 Original-Received: from localhost ([::1]:36725 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrOQn-0003ek-03 for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Oct 2015 06:58:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrOQh-0003eV-Oa for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2015 06:58:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrOQc-0004Ky-OS for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2015 06:58:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50534) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrOQc-0004Ku-Kj for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2015 06:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZrOQc-00011Z-Ev for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2015 06:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Oct 2015 10:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21762 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 21762-submit@debbugs.gnu.org id=B21762.14460298633896 (code B ref 21762); Wed, 28 Oct 2015 10:58:02 +0000 Original-Received: (at 21762) by debbugs.gnu.org; 28 Oct 2015 10:57:43 +0000 Original-Received: from localhost ([127.0.0.1]:41242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrOQI-00010j-Tq for submit@debbugs.gnu.org; Wed, 28 Oct 2015 06:57:43 -0400 Original-Received: from mail-lb0-f175.google.com ([209.85.217.175]:35154) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrOQG-00010X-8F for 21762@debbugs.gnu.org; Wed, 28 Oct 2015 06:57:40 -0400 Original-Received: by lbbes7 with SMTP id es7so2674586lbb.2 for <21762@debbugs.gnu.org>; Wed, 28 Oct 2015 03:57:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=82wHSZddiWaxs9UpECIxssItouqjhUz3TsMBl/eflsE=; b=uK7QfItCOWWsT5vcxWWuvign8/E+XRjGoTd2A8lPqXplYETJqVMcSVCTxhX4ekJsBY 3/TDQfwZXROPZtmfVHDsqOE8QKH8fZPgcm1bdwzP4yYAhmghgx6VwmzlP3Y08j0v21IH 2NWs8mpCDrBvfGKtBtPGn8Fm+6LzYlO7L/iCMTbVEnV5fP/IdBjq/ce08VSQcp4YPox2 rUMabzAhCSXLRIdnJfDg3DYP/E8AfQzCI7ANA2xaOoFetfahb9jp6BtPj9Vo9B1ZKm2x x6CXUKs9pCX4HUJ53u82W35ekCPAPMZiAfVrIhjDNum3b3TPr2hx9q6vSCO9FgjZZLP6 gCQA== X-Received: by 10.112.54.169 with SMTP id k9mr22238124lbp.95.1446029859291; Wed, 28 Oct 2015 03:57:39 -0700 (PDT) Original-Received: by 10.25.217.135 with HTTP; Wed, 28 Oct 2015 03:56:59 -0700 (PDT) In-Reply-To: <500758cc17b5439597082f0f9214972f@FE-MBX1012.de.bosch.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:108098 Archived-At: --001a11c3f5c4190b5b0523281068 Content-Type: text/plain; charset=UTF-8 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") --001a11c3f5c4190b5b0523281068 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Mon, Oct 26, 2015 at 1:00 PM, Dixon Ryan (ETAS/ERS-PD2)= <Ryan.Dixon@etas.com> wro= te:

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

Yes, reproducible in 25.0= .50. `python-syntax-closing-paren-p' needs to cater for the case that t= here is no syntax after point...

Perhaps something= like this. Fabian?


diff --git= a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 6ff1= 2b5..96342e5 100644
--- a/lisp/progmodes/python.el
+++ = b/lisp/progmodes/python.el
@@ -490,8 +490,8 @@ python-syntax-comm= ent-or-string-p
=C2=A0
=C2=A0(defsubst python-syntax-cl= osing-paren-p ()
=C2=A0 =C2=A0"Return non-nil if char after = point is a closing paren."
- =C2=A0(=3D (syntax-class (synta= x-after (point)))
- =C2=A0 =C2=A0 (syntax-class (string-to-syntax= ")"))))
+ =C2=A0(equal (syntax-class (syntax-after (po= int)))
+ =C2=A0 =C2=A0 =C2=A0(syntax-class (string-to-syntax &quo= t;)"))))
=C2=A0
=C2=A0(define-obsolete-function-al= ias
=C2=A0 =C2=A0'python-info-ppss-context #'python-synta= x-context "24.3")

--001a11c3f5c4190b5b0523281068--