[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CPerl-mode bug [Re: Relation with package authors (CPerl-mode follow
From: |
Stefan Monnier |
Subject: |
Re: CPerl-mode bug [Re: Relation with package authors (CPerl-mode follow-ups)] |
Date: |
Wed, 29 Jun 2005 04:00:23 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
[ Hi Ilya, I've installed another minor patch in Emacs's CVS repository.
It's not needed for your version of cperl-mode, but you might still be
interested. ]
> After trying to reproduce all cperl-mode bugs from the Debian BTS,
> it seems that most of them have been fixed in the CVS trunk, but
> one which is a regression from the original CPerl-mode from
> Ilya.
> Could you please take care of this?
[...]
> subroutine names which contain built in keywords/function-names
> delimited by _ characters get highlighted incorrectly:
> For example, in emacs20-el:
> sub foo_print_desc ()
> {
> }
> 'foo_print_desc' gets highlighted in font-lock-function-name-face
So the bug is indeed absent from Ilya's cperl-mode and it is triggered by
the fact that Emacs's cperl-mode.el does not give _ word syntax.
To make up for it, the normal answer is to set font-lock-defaults so that _
does have word syntax during font-locking (but not while editing).
To get it to work I had to remove an apparently spurious set-syntax-table in
cperl-find-pods-heres.
See the patch below which seems to fix it,
Stefan
--- cperl-mode.el 20 jun 2005 09:35:15 -0400 1.70
+++ cperl-mode.el 29 jun 2005 03:53:37 -0400
@@ -1516,7 +1516,8 @@
(t
'((cperl-load-font-lock-keywords
cperl-load-font-lock-keywords-1
- cperl-load-font-lock-keywords-2)))))
+ cperl-load-font-lock-keywords-2)
+ nil nil ((?_ . "w"))))))
(make-local-variable 'cperl-syntax-state)
(if cperl-use-syntax-table-text-property
(progn
@@ -3840,7 +3841,11 @@
(and (buffer-modified-p)
(not modified)
(set-buffer-modified-p nil))
- (set-syntax-table cperl-mode-syntax-table))
+ ;; I do not understand what this is doing here. It breaks font-locking
+ ;; because it resets the syntax-table from font-lock-syntax-table to
+ ;; cperl-mode-syntax-table.
+ ;; (set-syntax-table cperl-mode-syntax-table)
+ )
(car err-l)))
(defun cperl-backward-to-noncomment (lim)
- CPerl-mode bug [Re: Relation with package authors (CPerl-mode follow-ups)], Jérôme Marant, 2005/06/18
- Re: CPerl-mode bug [Re: Relation with package authors (CPerl-mode follow-ups)],
Stefan Monnier <=
- Re: CPerl-mode bug [Re: Relation with package authors (CPerl-mode follow-ups)], Jérôme Marant, 2005/06/29
- Re: CPerl-mode bug [Re: Relation with package authors (CPerl-mode follow-ups)], Ilya Zakharevich, 2005/06/30
- Re: CPerl-mode bug [Re: Relation with package authors (CPerl-mode follow-ups)], Miles Bader, 2005/06/30
- Re: CPerl-mode bug [Re: Relation with package authors (CPerl-mode follow-ups)], Ilya Zakharevich, 2005/06/30
- Re: CPerl-mode bug [Re: Relation with package authors (CPerl-mode follow-ups)], Miles Bader, 2005/06/30
- Re: CPerl-mode bug [Re: Relation with package authors (CPerl-mode follow-ups)], Ilya Zakharevich, 2005/06/30
- Re: CPerl-mode bug [Re: Relation with package authors (CPerl-mode follow-ups)], Miles Bader, 2005/06/30
- Re: CPerl-mode bug [Re: Relation with package authors (CPerl-mode follow-ups)], Ilya Zakharevich, 2005/06/30
- Re: CPerl-mode bug [Re: Relation with package authors (CPerl-mode follow-ups)], Miles Bader, 2005/06/30
- Re: CPerl-mode bug [Re: Relation with package authors (CPerl-mode follow-ups)], Richard M. Stallman, 2005/06/30