From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8_?= =?UTF-8?Q?=D0=9A=D0=BE=D0=BB=D0=B5=D0=B2?= Newsgroups: gmane.emacs.bugs Subject: bug#26037: =?UTF-8?Q?[=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8_?= =?UTF-8?Q?=D0=9A=D0=BE=D0=BB=D0=B5=D0=B2]?= Re: bug#26037: 25.1; perl-mode add syntax support for subroutine signatures Date: Wed, 29 Mar 2017 09:28:40 +0300 Message-ID: References: <87o9wm2hwt.fsf@users.sourceforge.net> <87lgrq2hko.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114104f8bdf218054bd8b182 X-Trace: blaine.gmane.org 1490769018 650 195.159.176.226 (29 Mar 2017 06:30:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 29 Mar 2017 06:30:18 +0000 (UTC) Cc: 26037@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 29 08:30:14 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ct77O-0007UX-Bi for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Mar 2017 08:30:06 +0200 Original-Received: from localhost ([::1]:56862 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ct77U-0000tv-7x for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Mar 2017 02:30:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ct77O-0000sT-4Z for bug-gnu-emacs@gnu.org; Wed, 29 Mar 2017 02:30:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ct77K-0002v1-UU for bug-gnu-emacs@gnu.org; Wed, 29 Mar 2017 02:30:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51786) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ct77K-0002ut-RX for bug-gnu-emacs@gnu.org; Wed, 29 Mar 2017 02:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ct77K-0005G5-GG for bug-gnu-emacs@gnu.org; Wed, 29 Mar 2017 02:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8_?= =?UTF-8?Q?=D0=9A=D0=BE=D0=BB=D0=B5=D0=B2?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Mar 2017 06:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26037 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26037-submit@debbugs.gnu.org id=B26037.149076895820133 (code B ref 26037); Wed, 29 Mar 2017 06:30:02 +0000 Original-Received: (at 26037) by debbugs.gnu.org; 29 Mar 2017 06:29:18 +0000 Original-Received: from localhost ([127.0.0.1]:49985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ct76c-0005Ef-Ft for submit@debbugs.gnu.org; Wed, 29 Mar 2017 02:29:18 -0400 Original-Received: from mail-lf0-f54.google.com ([209.85.215.54]:34365) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ct76a-0005ES-9v for 26037@debbugs.gnu.org; Wed, 29 Mar 2017 02:29:16 -0400 Original-Received: by mail-lf0-f54.google.com with SMTP id z15so2583092lfd.1 for <26037@debbugs.gnu.org>; Tue, 28 Mar 2017 23:29:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=p+tdLE4QP+OxMN0rDN7mpGbHW22nqp1rhIum5NRVLzM=; b=LSGXmonM3HcRWgTFRg7vY/oxxuWESUDycIfqJQ/UITb9ioy2gdvk5rTQNMy50e7QT0 lrYMdSdxH1iNMdDfensPy3XJLlZtc9AhnBFqjo2dqo3WOcEhZWEtpMlOsloehpCfkfIG w1wF4zbP++BZMTCPjVBabdalhQpjhM3jWxdS6fI5YOfilBbuCo1e1eNFmKTlmzJaK4NG bFJGvmM4qxA44hn5RSgwRxFFIPQdL8YA4gf1IaMGCmYbnDAIwguGi4zhStB18GdiSdOL eN7oyLXQGNDyy6XvaVlSJ5yWT9vFeQMQVUtp76jxUc4+265L5laLbH8+C5u+py9H7P78 gAig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=p+tdLE4QP+OxMN0rDN7mpGbHW22nqp1rhIum5NRVLzM=; b=KOxzEZIOtZ+BjDd7xZZ9aS5VIPT/y1E+7ulpLNE05rSe4jQyQ4VGkkbOQ4Zb/TzF/w 4TUqUJzNbo706rCQURyP7UMecs5kPpactl9V7n5AbacuDCiZUMcG0AJXmgu9xffvoO8Z I/Uh5P65OcHeNXWhmgjjQGZcpDPw6kh21iXxZtX+bvlN7o2uJjTuTt6ZLJ0JrS5lweCa Z/p7JljfWBHtC0Ts+wHHhlsP2Pm+dM+EV8bQ94hdMJevjMzyT45MPkfHL0L/KlCZDbwL dKpfVbr0TdssigG3QjBsB7ObLhbxX0e+kPo7Yhij4dJf2XE3gBbadV6p8R2novHqoQBg XTOw== X-Gm-Message-State: AFeK/H0WGeFAEh3ro6NkuPhSWP7ob35fIMaKnc5v1o/CUhX0Gdw8Q43cg7/byU+RufhRFawGyGAoCkxp6sBoKg== X-Received: by 10.25.33.208 with SMTP id h199mr14006348lfh.68.1490768950578; Tue, 28 Mar 2017 23:29:10 -0700 (PDT) Original-Received: by 10.25.157.82 with HTTP; Tue, 28 Mar 2017 23:28:40 -0700 (PDT) In-Reply-To: <87lgrq2hko.fsf@users.sourceforge.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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" Xref: news.gmane.org gmane.emacs.bugs:131046 Archived-At: --001a114104f8bdf218054bd8b182 Content-Type: text/plain; charset=UTF-8 Sure, here's the updated patch: >From de1c6f786b8366423cca7edce1ecfabe763567d0 Mon Sep 17 00:00:00 2001 From: Evgeni Kolev Date: Mon, 27 Mar 2017 09:30:10 +0300 Subject: [PATCH] Propertize only perl prototype chars `][$%&*;+@\' as punctuation As a result, variables in signatures such as `sub add ($a, $b) are not treated as punctuation. * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Strictly match only prototype characters as punctuation. (Bug#26037) Copyright-paperwork-exempt: yes --- lisp/progmodes/perl-mode.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index a516f07..45628e3 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -255,9 +255,11 @@ ;; format statements ("^[ \t]*format.*=[ \t]*\\(\n\\)" (1 (prog1 "\"" (perl-syntax-propertize-special-constructs end)))) - ;; Funny things in `sub' arg-specs like `sub myfun ($)' or `sub ($)'. - ;; Be careful not to match "sub { (...) ... }". - ("\\Sure, here's the updated patch:

From de1c6f786b8366423cca7edce1ecfabe763567d0 Mon Sep 17 0= 0:00:00 2001
From: Evgeni Kolev <evgenysw@gmail.com>
Date: Mon, 27 Mar 2017 09:30:= 10 +0300
Subject: [PATCH] Propertize only perl prototype chars `]= [$%&*;+@\' as
=C2=A0punctuation

= As a result, variables in signatures such as `sub add ($a, $b) are not
treated as punctuation.
* lisp/progmodes/perl-mode.el (perl= -syntax-propertize-function):
Strictly match only prototype chara= cters as punctuation. (Bug#26037)

Copyright-paperw= ork-exempt: yes
---
=C2=A0lisp/progmodes/perl-mode.el |= 8 +++++---
=C2=A01 file changed, 5 insertions(+), 3 deletions(-)=

diff --git a/lisp/progmodes/perl-mode.el b/lisp/p= rogmodes/perl-mode.el
index a516f07..45628e3 100644
---= a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el<= /div>
@@ -255,9 +255,11 @@
=C2=A0 =C2=A0 =C2=A0 =C2=A0;; form= at statements
=C2=A0 =C2=A0 =C2=A0 =C2=A0("^[ \t]*format.*= =3D[ \t]*\\(\n\\)"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (1 (prog1 &qu= ot;\"" (perl-syntax-propertize-special-constructs end))))
- =C2=A0 =C2=A0 =C2=A0;; Funny things in `sub' arg-specs like `sub m= yfun ($)' or `sub ($)'.
- =C2=A0 =C2=A0 =C2=A0;; Be caref= ul not to match "sub { (...) ... }".
- =C2=A0 =C2=A0 = =C2=A0("\\<sub\\(?:[\s\t\n]+\\(?:\\sw\\|\\s_\\)+\\)?[\s\t\n]*(\\([^= )]+\\))"
+ =C2=A0 =C2=A0 =C2=A0;; Propertize perl prototype = chars `$%&*;+@\[]' as punctuation
+ =C2=A0 =C2=A0 =C2=A0;= ; in `sub' arg-specs like `sub myfun ($)' and `sub ($)'. But
+ =C2=A0 =C2=A0 =C2=A0;; don't match subroutine signatures like= `sub add ($a, $b)', or
+ =C2=A0 =C2=A0 =C2=A0;; anonymous su= bs like "sub { (...) ... }".
+ =C2=A0 =C2=A0 =C2=A0(&qu= ot;\\<sub\\(?:[\s\t\n]+\\(?:\\sw\\|\\s_\\)+\\)?[\s\t\n]*(\\([][$%&*;= +@\\]+\\))"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (1 "."))
=C2=A0 =C2=A0 =C2=A0 =C2=A0;; Turn __DATA__ trailer into a comment= .
=C2=A0 =C2=A0 =C2=A0 =C2=A0("^\\(_\\)_\\(?:DATA\\|END\\)__= [ \t]*\\(?:\\(\n\\)#.-\\*-.*perl.*-\\*-\\|\n.*\\)"
--=C2=A0<= /div>
2.10.0

--001a114104f8bdf218054bd8b182--