From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: immerrr again Newsgroups: gmane.emacs.bugs Subject: bug#21671: [PATCH] fix python.el hanging up during fontification #21657 Date: Mon, 12 Oct 2015 14:48:50 +0300 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a11493a2cb0bd810521e6e9a7 X-Trace: ger.gmane.org 1444650558 1450 80.91.229.3 (12 Oct 2015 11:49:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Oct 2015 11:49:18 +0000 (UTC) To: 21671@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 12 13:49:11 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 1ZlbbJ-0007rw-8S for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Oct 2015 13:49:09 +0200 Original-Received: from localhost ([::1]:54739 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlbbJ-00020g-02 for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Oct 2015 07:49:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlbbD-00020E-UR for bug-gnu-emacs@gnu.org; Mon, 12 Oct 2015 07:49:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZlbbC-0005tM-Jv for bug-gnu-emacs@gnu.org; Mon, 12 Oct 2015 07:49:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47939) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlbbC-0005tI-Gt for bug-gnu-emacs@gnu.org; Mon, 12 Oct 2015 07:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZlbbC-0007GD-BH for bug-gnu-emacs@gnu.org; Mon, 12 Oct 2015 07:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: immerrr again Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Oct 2015 11:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21671 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.144465053827897 (code B ref -1); Mon, 12 Oct 2015 11:49:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Oct 2015 11:48:58 +0000 Original-Received: from localhost ([127.0.0.1]:36910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zlbb7-0007Ft-Uv for submit@debbugs.gnu.org; Mon, 12 Oct 2015 07:48:58 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36927) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zlbb5-0007Fk-CJ for submit@debbugs.gnu.org; Mon, 12 Oct 2015 07:48:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zlbb3-0005qQ-Q4 for submit@debbugs.gnu.org; Mon, 12 Oct 2015 07:48:54 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:43168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zlbb3-0005qL-Ns for submit@debbugs.gnu.org; Mon, 12 Oct 2015 07:48:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zlbb2-0001z7-HH for bug-gnu-emacs@gnu.org; Mon, 12 Oct 2015 07:48:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zlbb1-0005pt-81 for bug-gnu-emacs@gnu.org; Mon, 12 Oct 2015 07:48:52 -0400 Original-Received: from mail-yk0-x233.google.com ([2607:f8b0:4002:c07::233]:33166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zlbb1-0005pp-2i for bug-gnu-emacs@gnu.org; Mon, 12 Oct 2015 07:48:51 -0400 Original-Received: by ykoo7 with SMTP id o7so17856947yko.0 for ; Mon, 12 Oct 2015 04:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=zUVFTSc0VgKtlkfCzIGuXFxs98nEtTJJNuMk9fnRkHY=; b=JTouzni+uTz2kqT0c6CldofYzdPhF0gW08jILAs+AtQoUqhvdRndDfW/x62Vqq/7lU YZR+7WULC8s0w4W/O9FP/FmafGf23lFlfOVMmUCRVYU9LGr2Rr0LcAnJh0xeYI0lUTDg cYAxD0qGVAm34QXKhIq4TOlTvBEy6e+94zQGQHJwiMYnhUjvGobTl/TEsxqBJC3WX6Ja CEKJIec9W1PB1LjSUnPS/tWWw+o8WdPRA2Cip6xx5N6C1rKXZAViHE5oS3S7Y/9hQLdY 9Mhg27106BmS3IZTPZpNkaomB/k42M9CIcO67hv1jocGw8WS83Bwuar5sLnC+a9J9rIa KmkA== X-Received: by 10.129.124.8 with SMTP id x8mr19854402ywc.44.1444650530405; Mon, 12 Oct 2015 04:48:50 -0700 (PDT) Original-Received: by 10.13.212.197 with HTTP; Mon, 12 Oct 2015 04:48:50 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:107536 Archived-At: --001a11493a2cb0bd810521e6e9a7 Content-Type: text/plain; charset=UTF-8 Two patches are included. One fixes the fact that for some reason syntax-propertize--done has ceased to be buffer-local after commit [1] and for some reason commit [2] did not help. I did it the way other buffer-local variables are initialized and it worked. The change fixes #21657 that was failing because syntax-propertize--done was inherited from scratch buffer and docstring boundaries were not propertized as a result. The other infinite loop I found accidentally when adding a whitespace before module docstring. I have fixed one corner-case of it, but in other circumstances I'd argue that whatever smart extensions python-mode adds to forward-sexp, those extensions should never move point less than the normal forward-sexp should. Cheers, immerrr 1. https://github.com/emacs-mirror/emacs/commit/3928ef2dd5b8febf3b1d9c1bfb22af3698d16bea 2. https://github.com/emacs-mirror/emacs/commit/0360b7f2c4f0358106e229de4dfe91a67445a50c --001a11493a2cb0bd810521e6e9a7 Content-Type: text/x-patch; charset=US-ASCII; name="0002-Prevent-infinite-loop-in-python-info-docstring-p.patch" Content-Disposition: attachment; filename="0002-Prevent-infinite-loop-in-python-info-docstring-p.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ifnv6bjs0 RnJvbSAxNDkwNjZkYmZjN2YxMWM0MGY2ZGJlZDcwYTMyNzkxNTNiZjNhYjdhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBpbW1lcnJyIDxpbW1lcnJyQGdtYWlsLmNvbT4KRGF0ZTogTW9u LCAxMiBPY3QgMjAxNSAxNDoxNzoxNiArMDMwMApTdWJqZWN0OiBbUEFUQ0ggMi8yXSBQcmV2ZW50 IG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h0ICcoc3RhdGVtZW50LXN0YXJ0IGJsb2NrLXN0YXJ0KSkKICAgICAgICAgICAgICAgICAgICAo Z290by1jaGFyIG5leHQtc2V4cC1wb3MpCi0gICAgICAgICAgICAgICAgICAgKHB5dGhvbi1uYXYt YmVnaW5uaW5nLW9mLXN0YXRlbWVudCkpCisgICAgICAgICAgICAgICAgICAgKHVubGVzcyAoYm9i cCkKKyAgICAgICAgICAgICAgICAgICAgIDs7IElmIGJhY2t3YXJkLXNleHAgYnJvdWdodCB0aGUg cG9pbnQgdG8KKyAgICAgICAgICAgICAgICAgICAgIDs7IGJlZ2lubmluZy1vZi1idWZmZXIsIGJl Z2lubmluZy1vZi1zdGF0ZW1lbnQKKyAgICAgICAgICAgICAgICAgICAgIDs7IHdpbGwgb25seSBi cmluZyBpdCBiYWNrLgorICAgICAgICAgICAgICAgICAgICAgKHB5dGhvbi1uYXYtYmVnaW5uaW5n LW9mLXN0YXRlbWVudCkpKQogICAgICAgICAgICAgICAgICAgKHQgKGdvdG8tY2hhciBuZXh0LXNl eHAtcG9zKSkpKSkpKSkpKQogCiAoZGVmdW4gcHl0aG9uLW5hdi1mb3J3YXJkLXNleHAgKCZvcHRp b25hbCBhcmcgc2FmZSBza2lwLXBhcmVucy1wKQotLSAKMi42LjEKCg== --001a11493a2cb0bd810521e6e9a7 Content-Type: text/x-patch; charset=US-ASCII; name="0001-Fix-syntax-propertize-done-to-be-buffer-local.patch" Content-Disposition: attachment; filename="0001-Fix-syntax-propertize-done-to-be-buffer-local.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ifnv6bkl1 RnJvbSBhMDg3OGFiZDY5MWU5Y2MzNmVlNzI5OGIyNDk1OTNhNzljZGQ2MDI5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBpbW1lcnJyIDxpbW1lcnJyQGdtYWlsLmNvbT4KRGF0ZTogTW9u LCAxMiBPY3QgMjAxNSAxNDoxNjo0OCArMDMwMApTdWJqZWN0OiB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