diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 86a5aa4..bae82ae 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -30,6 +30,20 @@ "Reindent the current buffer." (interactive) (indent-region (point-min) (point-max))) +(defun set-face-attributes (list-of-lists) + "For each sublist of LIST-OF-LISTS, apply the attributes specified in +the cdr to the face specified by the car. + +That is, the call: + + (set-face-attributes '((font-lock-comment-face :slant italic))) + +will set the `:slant' attribute of `font-lock-comment-face' to the +value `italic'." + (mapc #'(lambda (l) + (apply #'set-face-attribute + `(,(car l) t ,@(cdr l)))) + list-of-lists)) ;; other key binds (global-set-key (kbd "C-c e r") 'reindent-buffer) @@ -200,20 +214,24 @@ (package-install 'magit) (global-set-key (kbd "C-c b") 'magit-blame) -;; fonts +;; faces (let - ((font-fixed "Roboto Mono") - (font-varpt "Roboto")) - (add-to-list 'default-frame-alist '(font . "Roboto Mono")) - (set-face-attribute 'default t :height 140) - (set-face-attribute 'fixed-pitch t :family font-fixed) - (set-face-attribute 'variable-pitch t :family font-varpt) - (set-face-attribute 'fixed-pitch-serif t - :family font-fixed - :weight 'regular)) -;; make comments italic -(set-face-attribute 'font-lock-comment-face t :slant 'italic) -(set-face-attribute 'font-lock-keyword-face t :slant 'italic) + ((fixedpt "Roboto Mono") + ( varpt "Roboto")) + (add-to-list 'default-frame-alist (cons 'font fixedpt)) + (set-face-attributes + '((default :height 140) + (fixed-pitch :family fixedpt) + (variable-pitch :family varpt) + (fixed-pitch :family fixedpt :weight regular) + (font-lock-comment-face :slant italic) + (font-lock-keyword-face :slant italic) + (help-key-binding + :family fixedpt + :background "#181825" + :foreground "#89b4fa" + :box (:line-width (-1 . -1) :color "#11111b" :style nil)) + (anzu-mode-line :foreground "#89b4fa")))) ;; custom (setq custom-file "~/.emacs.d/custom.el")