From: gobo72 Date: Thu, 15 Sep 2011 05:27:54 +0000 (+0000) Subject: Ajouts emacsrc pour coloration en mode C X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=cafa439bf53e1523f8ea9cc1ff01621bd4f8ebe7;p=hvlinux.git Ajouts emacsrc pour coloration en mode C --- diff --git a/stage5/misc/emacs/emacsrc b/stage5/misc/emacs/emacsrc index 9db7a0e..ba35287 100644 --- a/stage5/misc/emacs/emacsrc +++ b/stage5/misc/emacs/emacsrc @@ -157,6 +157,33 @@ (add-hook 'after-save-hook 'byte-compile-user-init-file t t))) (add-hook 'emacs-lisp-mode-hook 'my-emacs-lisp-mode-hook) +;; To highlight function calls in CC mode. +(defface font-lock-function-call-face + '((t (:foreground "mediumpurple"))) + "Font Lock mode face used to highlight function calls." + :group 'font-lock-highlighting-faces) +(defvar font-lock-function-call-face 'font-lock-function-call-face) +(add-hook 'c-mode-hook + (lambda () + (font-lock-add-keywords + nil + '(("\\<\\(\\sw+\\) ?(" 1 font-lock-function-call-face)) t))) + +;; Pour colorer TRUE et FALSE +(defconst bm-additional-constant-keywords + (cons + (regexp-opt + (list + "TRUE" "FALSE" + ) 'words) + font-lock-constant-face + )) +(font-lock-add-keywords + 'c-mode + (list + bm-additional-constant-keywords + )) + (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful.