Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the face of scalar variables in emacs cperl-mode?

In cperl-mode I am able to change the array and hash faces with M-x customize-group RET cperl-faces RET, and change Cperl Hash Face and Cperl Hash Face. But I can not see any option for changing the scalar variables color.

I have tried to change font-lock-variable-name-face both inside the code or from Cperl Ps Print Face Properties (where I really want to change the color is in the print) but It does not work. I have tried several cperl-modes from 4.32 to the rockway-perl6-branch.

Also I would like not to have the $ colored in the variables, therefore the sigil would stand out better in the printouts (this was asked already here but not resolved).

could someone provide me any hints?

like image 825
Pablo Marin-Garcia Avatar asked Nov 05 '22 05:11

Pablo Marin-Garcia


1 Answers

Well, first you'd have to modify cperl-mode to fontify scalar variables. It only highlights arrays and hashes. It doesn't apply any face to scalars, except in certain constructs like my.

like image 130
cjm Avatar answered Nov 09 '22 09:11

cjm