simpler code

This commit is contained in:
amirrezaask 2020-02-23 19:49:12 +03:30
parent 5ff4bfaf33
commit 02467ed8db
2 changed files with 5 additions and 8 deletions

View File

@ -56,10 +56,10 @@
(setq delete-old-versions t)
;; Font Configuration -----------------------------------
(ability fira-font ()
"Sets the default font to Fira Mono"
(add-to-list 'default-frame-alist '(font . (get-fg42-font)))
(set-face-attribute 'default t :font (get-fg42-font)))
(ability font ()
"Sets the default font to fg42 font"
(add-to-list 'default-frame-alist '(cons 'font fg42-font))
(set-face-attribute 'default t :font fg42-font))
;; ------------------------------------------------------
(cheatsheet-add :group '--HELP--

View File

@ -65,15 +65,12 @@ with is the buffer."
"Apply the given FACE-SYMBOL to the given TEXT."
(put-text-property 0 (length text) 'face face-symbol text))
(setq fg42--default-font "Fira Mono")
(defvar fg42-font "" "FG42 font set by user")
(setq fg42-font "Fira Mono")
(defun fg42-font (font)
(setq fg42-font font))
(defun get-fg42-font ()
(if fg42-font fg42-font fg42--default-font))
(provide 'fg42/utils)
;;; utils.el ends here