Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to highlight percentage sign "%" for fortran code in emacs?

How can I highlight in Emacs the percentage sign "%" for accessing members of a type?

like image 353
Hans Maulwurf Avatar asked Oct 29 '14 13:10

Hans Maulwurf


1 Answers

Add the following to your .emacs:

(font-lock-add-keywords 'f90-mode
        '(("%" . font-lock-keyword-face)))

This highlights % in the same colour as keywords like if, then, call, etc. There are a load of predefined faces listed in the manual, or you can specify a face manually.

like image 183
Yossarian Avatar answered Nov 15 '22 19:11

Yossarian