Font-lock in cperl-mode is broken

  • Done
  • quality assurance status badge
Details
2 participants
  • Chong Yidong
  • Herbert Euler
Owner
unassigned
Submitted by
Herbert Euler
Severity
normal
H
H
Herbert Euler wrote on 1 Sep 2009 06:21
(address . bug-gnu-emacs@gnu.org)
BAY143-W181E3E3B91E35C0081E193DAF10@phx.gbl
Package: emacs
Version: 23.0.50

In the newest Emacs HEAD source, font-lock in cperl-mode is broken.
Here are the steps to reproduce the problem:

1. Start emacs:

$ emacs -Q

2. Visit an empty perl file and switch to cperl-mode:

C-x C-f x.pl
M-x cperl-mode

3. Type `print' (no any characters follow the character `t'):

print|

The vertical bar `|' here indicates the cursor. Now the word
`print' is highlighted with face `cperl-nonoverridable-face'.

4. Now that the cursor is after the character `t', type SPC to append
a whitespace character.

print |

This time, the word `print' gets unhighlighted. There is no
property `face' for that word now:

;; Point is in between `print'.
(text-properties-at (point))
==> (fontified t)

Appending more whitespace characters will not call the highlight
back. However, deleting all of the whitespace characters
highlights it again.

print | ;; Type DEL
print| ;; `print' gets highlighted again

And the face property is added back:

;; Point is in between `print'.
(text-properties-at (point))
==> (face cperl-nonoverridable-face font-lock-multiline t fontified t)

The same problem exists for larger Perl programs. This is only a
simple case.

Regards,
Guanpeng Xu


_________________________________________________________________
More than messages–check out the rest of the Windows Live™.
Attachment: file
C
C
Chong Yidong wrote on 13 Sep 2009 19:11
(name . Herbert Euler)(address . herberteuler@hotmail.com)(address . 4304-done@debbugs.gnu.org)
87vdjmwz0j.fsf@cyd.mit.edu
Toggle quote (2 lines)
> In the newest Emacs HEAD source, font-lock in cperl-mode is broken.

This was my mistake; I've checked in a fix. Thanks.
?