mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
cperl-mode: Highlight '{$a++ / $b}' correctly
* lisp/progmodes/cperl-mode.el (cperl-find-pods-heres):
Recognize {$a++ / $b} correctly as division. (Bug#42168)
* test/lisp/progmodes/cperl-mode-tests.el: New file with test
verifying the fix.
This commit is contained in:
parent
32cb84974f
commit
f3ff51288f
2 changed files with 53 additions and 0 deletions
|
|
@ -3979,6 +3979,9 @@ the sections using `cperl-pod-head-face', `cperl-pod-face',
|
|||
(and (eq (preceding-char) ?.)
|
||||
(eq (char-after (- (point) 2)) ?.))
|
||||
(bobp))
|
||||
;; { $a++ / $b } doesn't start a regex, nor does $a--
|
||||
(not (and (memq (preceding-char) '(?+ ?-))
|
||||
(eq (preceding-char) (char-before (1- (point))))))
|
||||
;; m|blah| ? foo : bar;
|
||||
(not
|
||||
(and (eq c ?\?)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue