Last active
May 19, 2016 09:15
-
-
Save MelleB/920ad8e6c9d68a50b0670f72d324b284 to your computer and use it in GitHub Desktop.
Change background color of python class and function definitions in Emacs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(font-lock-add-keywords 'python-mode | |
'(("^\s*\\(def\s*\\)\\(.*\\)\\((.*):.*\xa\\)" | |
(1 '(:inherit 'font-lock-keyword-face :background "#F3F3F3")) | |
(2 '(:inherit 'font-lock-function-name-face :background "#F3F3F3" :weight bold)) | |
(3 '(:background "#F3F3F3")) | |
) | |
("^\s*\\(class\s*\\)\\(.*\\)\\((.*):.*\xa\\)" | |
(1 '(:inherit 'font-lock-keyword-face :background "#EEEEEE" :height 1.4)) | |
(2 '(:inherit 'font-lock-function-name-face :background "#EEEEEE" :height 1.4 :weight bold)) | |
(3 '(:background "#EEEEEE" :height 1.4)) | |
) | |
)) |
Author
MelleB
commented
May 19, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment