From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#26037: 25.1; perl-mode add syntax support for subroutine signatures Date: Sat, 11 Mar 2017 09:26:21 -0500 Message-ID: <87bmt799f6.fsf@users.sourceforge.net> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1489242373 23905 195.159.176.226 (11 Mar 2017 14:26:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 11 Mar 2017 14:26:13 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: 26037@debbugs.gnu.org To: Evgeni Kolev Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 11 15:26:09 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 1cmhyA-0005Yn-3M for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Mar 2017 15:26:06 +0100 Original-Received: from localhost ([::1]:43628 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmhyG-0008Ew-1c for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Mar 2017 09:26:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmhyA-0008Dd-5h for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2017 09:26:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cmhy6-0004Ds-SP for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2017 09:26:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52215) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cmhy6-0004Dd-OT for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2017 09:26:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cmhy6-00063p-EZ for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2017 09:26:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Mar 2017 14:26: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.148924231323235 (code B ref 26037); Sat, 11 Mar 2017 14:26:02 +0000 Original-Received: (at 26037) by debbugs.gnu.org; 11 Mar 2017 14:25:13 +0000 Original-Received: from localhost ([127.0.0.1]:50414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cmhxI-00062c-VM for submit@debbugs.gnu.org; Sat, 11 Mar 2017 09:25:13 -0500 Original-Received: from mail-io0-f194.google.com ([209.85.223.194]:34590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cmhxG-00062J-2W; Sat, 11 Mar 2017 09:25:11 -0500 Original-Received: by mail-io0-f194.google.com with SMTP id n76so9468092ioe.1; Sat, 11 Mar 2017 06:25:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=bxYvvEQzE0biN2D+KDK6m9cIdCHBRS7K+VETsiUnmzA=; b=Zw0/Ephq/gh76qIGegASi2LO+eWKmFHvQa27S6TndofoGmfXjsP7qGd+bXZWhJGaeQ 6sWw3+ZoDqXE+icp5MNj49ULSFtlMDoH9Oscu0gtcsFY0pg7FIkyXe11sl1aYjkXZJvN nYUXQEnFVR2yKov3y0UYKVHLSSSsSkAwQCEk0mVA4BxMEOJD9pPX6irrvAKVOn3f9lH5 YkF+uPkJZPIdPxfFFRkjw8g0DTfiZfD1rO1kA3V0HCJNY+mnXGKeHy7OLfEhbXaRZb2r EOm2S0CK7kHEFWwdSzkB1szaIqbClzZw8ZXepSej7iLCKPvEqpWhLw7OoUXUFDWm6NR0 S2Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=bxYvvEQzE0biN2D+KDK6m9cIdCHBRS7K+VETsiUnmzA=; b=iLUpaWIuYB4/+kbVejmUYGXFBlLdxVYXnmTU1GhI5J4vv+W6aY6hz7MhepPh/cEZ6Q 0walzLccaTROHfaGvf7HBRQMX+8r8ieepf0Fl1q344GTR9o8cOsOzXGbX7V6R4XyMw9Q 8Fm1UmIsRhRtFHpvwdR5T24b/u6nWlcWeAkmPoCSZ6G5l2CsV3gQ8CAQ0wcSQmU3D8kI DVitkx9UBdcHpe4zi0fWCh9Eg9REnIMzB2Wp+/F46HDBkFRdLMZaZpqCOcFEGL3GP4kh MhB0YNt8+Zu0EO5lmZlFPK535xDzTa5coH5PTCGGN2faLwek2slHOu3hZu0Yf473BMae /cmw== X-Gm-Message-State: AMke39maS5mYoqWc2Pz1lPg7qyxLG+hoXbO2EpEqjkzw/9TbALJa7EowVI58P8+YVGfHWw== X-Received: by 10.107.3.170 with SMTP id e42mr19700677ioi.208.1489242304589; Sat, 11 Mar 2017 06:25:04 -0800 (PST) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id p77sm5760907iod.4.2017.03.11.06.25.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 11 Mar 2017 06:25:04 -0800 (PST) In-Reply-To: (Evgeni Kolev's message of "Thu, 9 Mar 2017 18:57:16 +0200") 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:130486 Archived-At: severity 26037 wishlist quit Evgeni Kolev writes: > perl 5.20 (released May 2014) added experimental support for subroutine > signatures. So this is valid perl code: > > sub test ($param) { > ... > } > > However, perl-mode's syntax rules treat everything between ( and ) as > punctuation (syntax class "."). As a result (thing-at-point 'word) > doesn't return $param when the point is on $param because $param is > considered punctuation. The patch below tries to address this by > using syntax class "@" inside the parens. > > diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el > index a516f07..2b9d9ad 100644 > --- a/lisp/progmodes/perl-mode.el > +++ b/lisp/progmodes/perl-mode.el > @@ -258,7 +258,7 @@ > ;; Funny things in `sub' arg-specs like `sub myfun ($)' or `sub ($)'. > ;; Be careful not to match "sub { (...) ... }". > ("\\ - (1 ".")) > + (1 "@")) Don't we still want 'sub ($)' and such to be marked with punctuation syntax?