Bonjour,
Perso, j'aime bien changer en fonction() du jour ou de la nuit.
J'ai donc ces deux fonctions() dans un ficher nomé "couleurs.el" situé dans "~/.emacs.d/site-lisp". je dois charger ce fichier pour les utiliser(voir code dans .emacs).
;;;;;;;;;;;;; fichier couleurs.el;;;;;;
;;Change la coloration syntaxique pour la pénombre
(defun couleur-sombre()
"Adapte la coloration syntaxique pour la pénombre"
(interactive)
(custom-set-faces
'(default ((t (:background "black" :foreground "white"))))
'(cursor ((t (:background "blue"))))
'(font-lock-comment-face ((t (:background "gray40" :foreground "green"))))
'(fringe ((t (:background "grey20"))))
'(mode-line ((((type x w32 mac) (class color)) (:background "grey70" :foreground "black"))))
'(scroll-bar ((t (:background "gray33"))))
'(vhdl-font-lock-translate-off-face ((((class color) (background light)) (:foreground "cyan4"))))
)
)
;;Change la coloration syntaxique pour la clareté
(defun couleur-claire()
"Adapte la coloration syntaxique pour la clarté"
(interactive)
(custom-set-faces
'(default ((t (:background "white" :foreground "black"))))
'(cursor ((t (:background "blue"))))
'(font-lock-comment-face ((t (:background "gray85" :foreground "firebrick"))))
'(fringe ((t (:background "grey95"))))
'(mode-line ((((type x w32 mac) (class color)) (:background "grey70" :foreground "black"))))
'(scroll-bar ((t (:background "gray33"))))
'(vhdl-font-lock-translate-off-face ((((class color) (background light)) (:foreground "cyan4"))))
)
)
(provide 'couleurs)
______________________________
Puis, j'ajoute ça dans .emacs :
;;Pour charger des paquet suplémentaire d emacs
(add-to-list 'load-path "~/.emacs.d/site-lisp")
;; customisation de mes couleurs
(require 'couleurs)
Bien sur les deux fonctions doivent ce trouver dans le chemain indiqué et "require 'couleurs" sans extention .el.
Bon amusement ! ;)