mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
cperl-mode: Don't interpret y_ as start of y// function.
* lisp/progmodes/cperl-mode.el (cperl-find-pods-heres): Avoid treating underscores as word-terminators. * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-47112): Test case for that bug (bug#47112).
This commit is contained in:
parent
846e8672bb
commit
261d0f8f74
2 changed files with 44 additions and 15 deletions
|
|
@ -3927,21 +3927,24 @@ the sections using `cperl-pod-head-face', `cperl-pod-face',
|
|||
bb (char-after (1- (match-beginning b1))) ; tmp holder
|
||||
;; bb == "Not a stringy"
|
||||
bb (if (eq b1 10) ; user variables/whatever
|
||||
(and (memq bb (append "$@%*#_:-&>" nil)) ; $#y)
|
||||
(cond ((eq bb ?-) (eq c ?s)) ; -s file test
|
||||
((eq bb ?\:) ; $opt::s
|
||||
(eq (char-after
|
||||
(- (match-beginning b1) 2))
|
||||
?\:))
|
||||
((eq bb ?\>) ; $foo->s
|
||||
(eq (char-after
|
||||
(- (match-beginning b1) 2))
|
||||
?\-))
|
||||
((eq bb ?\&)
|
||||
(not (eq (char-after ; &&m/blah/
|
||||
(- (match-beginning b1) 2))
|
||||
?\&)))
|
||||
(t t)))
|
||||
(or
|
||||
; false positive: "y_" has no word boundary
|
||||
(save-match-data (looking-at "_"))
|
||||
(and (memq bb (append "$@%*#_:-&>" nil)) ; $#y)
|
||||
(cond ((eq bb ?-) (eq c ?s)) ; -s file test
|
||||
((eq bb ?\:) ; $opt::s
|
||||
(eq (char-after
|
||||
(- (match-beginning b1) 2))
|
||||
?\:))
|
||||
((eq bb ?\>) ; $foo->s
|
||||
(eq (char-after
|
||||
(- (match-beginning b1) 2))
|
||||
?\-))
|
||||
((eq bb ?\&)
|
||||
(not (eq (char-after ; &&m/blah/
|
||||
(- (match-beginning b1) 2))
|
||||
?\&)))
|
||||
(t t))))
|
||||
;; <file> or <$file>
|
||||
(and (eq c ?\<)
|
||||
;; Do not stringify <FH>, <$fh> :
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue