summary refs log tree commit diff stats
path: root/README.md
diff options
context:
space:
mode:
authorCase Duckworth2020-12-22 00:14:58 -0600
committerCase Duckworth2020-12-22 00:17:03 -0600
commit705e8d4b7b3dfc0e70fe634d223ceea81661de1e (patch)
treeadc266671b9d76c5fefa6396c4190135217e43d3 /README.md
parentUpdate README (diff)
downloademacs-705e8d4b7b3dfc0e70fe634d223ceea81661de1e.tar.gz
emacs-705e8d4b7b3dfc0e70fe634d223ceea81661de1e.zip
Correct set-face-from-alternatives function
Diffstat (limited to 'README.md')
-rw-r--r--README.md14
1 files changed, 5 insertions, 9 deletions
diff --git a/README.md b/README.md index a35da41..9e0e26d 100644 --- a/README.md +++ b/README.md
@@ -398,18 +398,14 @@ from [link0ff](https://github.com/link0ff/emacs-init).
398 398
3991. Define fonts 3991. Define fonts
400 400
401 (defun font-candidate (&rest fonts)
402 (catch :font
403 (dolist (font fonts)
404 (if (find-font (font-spec :name font))
405 (throw :font font)))))
406
407 (defun set-face-from-alternatives (face fonts) 401 (defun set-face-from-alternatives (face fonts)
408 (dolist (font fonts) 402 (catch :return
409 (if (find-font (font-spec :family (car font))) 403 (dolist (font fonts)
404 (when (find-font (font-spec :family (car font)))
410 (apply #'set-face-attribute `(,face nil 405 (apply #'set-face-attribute `(,face nil
411 :family ,(car font) 406 :family ,(car font)
412 ,@(cdr font)))))) 407 ,@(cdr font)))
408 (throw :return font)))))
413 409
414 (defun acdw/setup-fonts () 410 (defun acdw/setup-fonts ()
415 "Setup fonts. This has to happen after the frame is setup for 411 "Setup fonts. This has to happen after the frame is setup for