From: npostavs@users.sourceforge.net
To: 26037@debbugs.gnu.org
Cc: "Евгени Колев" <evgenysw@gmail.com>
Subject: bug#26037: [Евгени Колев] Re: bug#26037: 25.1; perl-mode add syntax support for subroutine signatures
Date: Mon, 27 Mar 2017 23:34:42 -0400 [thread overview]
Message-ID: <87o9wm2hwt.fsf@users.sourceforge.net> (raw)
In-Reply-To: <CAMCrgaXutf0eDg3+Y54D+BhdJotZSCbGGC4amwwC1YbRuP2pNQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 60 bytes --]
[Please use Reply All to keep 26037@debbugs.gnu.org on Cc]
[-- Attachment #2: Type: message/rfc822, Size: 2544 bytes --]
[-- Attachment #2.1.1: Type: text/plain, Size: 1710 bytes --]
Sure! Here's output of format-patch, with `+' added to the regex and
updated comment, and again, please let me know if it can be improved:
From 250e022caf3889a1778820bac1ad072240fa93d4 Mon Sep 17 00: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
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 | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index a516f07..1bcc743 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -255,9 +255,10 @@
;; 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 { (...) ... }".
- ("\\<sub\\(?:[\s\t\n]+\\(?:\\sw\\|\\s_\\)+\\)?[\s\t\n]*(\\([^)]+\\))"
+ ;; Propertize perl prototype chars `][$%&*;+@\' as punctioation
+ ;; in `sub' arg-specs like `sub myfun ($)' or `sub ($)'. Be
+ ;; careful not to match "sub { (...) ... }".
+
("\\<sub\\(?:[\s\t\n]+\\(?:\\sw\\|\\s_\\)+\\)?[\s\t\n]*(\\([][$%&*;+@\\]+\\))"
(1 "."))
;; Turn __DATA__ trailer into a comment.
("^\\(_\\)_\\(?:DATA\\|END\\)__[
\t]*\\(?:\\(\n\\)#.-\\*-.*perl.*-\\*-\\|\n.*\\)"
--
2.10.0
next prev parent reply other threads:[~2017-03-28 3:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-09 16:57 bug#26037: 25.1; perl-mode add syntax support for subroutine signatures Evgeni Kolev
2017-03-11 14:26 ` npostavs
2017-03-15 2:08 ` npostavs
2017-03-16 0:49 ` npostavs
2017-03-18 14:24 ` Евгени Колев
2017-03-18 15:58 ` npostavs
2017-03-26 17:29 ` Евгени Колев
2017-03-26 18:04 ` npostavs
2017-03-28 3:34 ` npostavs [this message]
2017-03-28 3:41 ` bug#26037: [Евгени Колев] " npostavs
2017-03-29 6:28 ` Евгени Колев
2017-03-29 23:46 ` npostavs
2017-04-01 21:40 ` npostavs
2017-04-03 7:49 ` Евгени Колев
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o9wm2hwt.fsf@users.sourceforge.net \
--to=npostavs@users.sourceforge.net \
--cc=26037@debbugs.gnu.org \
--cc=evgenysw@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.