[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: fichier .emacs



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 ! ;)


Le 14 janvier 2016 à 12:56, Bernard Schoenacker <bernard.schoenacker@free.fr> a écrit :
bonjour,

j'ai trouvé sur le net un .emacs intéressant mais il me manque la
couleur ...

http://www.freebsd.org/doc/fr/books/developers-handbook/emacs.html

vi-vi comment y arriver ?

au moins j'apprendrais à employer emacs pour le courriel (mh-e)

slt
bernard



Reply to: