; cperl-mode.el: Don't misinterpret exec_fcn as keyword exec
* lisp/progmodes/cperl-mode.el (cperl-after-block-and-statement-beg): Recognize _ as part of a Perl symbol. Fixes Bug#76851 * test/lisp/progmodes/cperl-mode-resources/cperl-indents.erts Two new test cases around the edges of Bug#76851
This commit is contained in:
parent
59d1aac49d
commit
b2f124f2a8
2 changed files with 20 additions and 1 deletions
|
@ -5539,7 +5539,7 @@ CHARS is a string that contains good characters to have before us (however,
|
|||
(forward-sexp -1)
|
||||
(not
|
||||
(looking-at
|
||||
"\\(map\\|grep\\|say\\|printf?\\|system\\|exec\\|tr\\|s\\)\\>")))))))
|
||||
"\\(map\\|grep\\|say\\|printf?\\|system\\|exec\\|tr\\|s\\)\\_>")))))))
|
||||
|
||||
|
||||
(defun cperl-indent-exp ()
|
||||
|
|
|
@ -79,3 +79,22 @@ class C
|
|||
|
||||
say "done!";
|
||||
=-=-=
|
||||
|
||||
Name: cperl-keyword-in-subname
|
||||
|
||||
=-=
|
||||
# Bug#76851
|
||||
sub exec_fcn {
|
||||
}
|
||||
|
||||
sub other {
|
||||
}
|
||||
=-=-=
|
||||
|
||||
Name: cperl-keyword-without-space
|
||||
|
||||
=-=
|
||||
# Bug#76851, message #13
|
||||
my %h = map{$_=>1}
|
||||
@ARGV;
|
||||
=-=-=
|
||||
|
|
Loading…
Add table
Reference in a new issue