Move `defface' forms to toplevel

This commit is contained in:
Gerard Vermeulen 2024-06-09 11:54:44 +02:00
parent cbbc3cf3aa
commit 686ac23749

View File

@ -506,9 +506,8 @@ Scale all other faces with a height that is a real number."
#+caption: Shadow Org font-lock faces to improve the readability.
#+name: lst:shadow-org-font-lock-faces
#+begin_src emacs-lisp -n
(with-eval-after-load 'emacs
;; Shadow two definitions in org-faces.el:
(defface org-block
;; Shadow two definitions in org-faces.el:
(defface org-block
;; https://emacs.stackexchange.com/a/9604 answers:
;; How to override a defined face for light and dark backgrounds?
`((((background dark))
@ -530,7 +529,7 @@ verse and quote blocks are fontified using the `org-verse' and
`org-quote' faces, which inherit from `org-block'."
:group 'org-faces)
(defface org-table
(defface org-table
;; https://emacs.stackexchange.com/a/9604 answers:
;; How to override a defined face for light and dark backgrounds?
`((((background dark))
@ -542,16 +541,15 @@ verse and quote blocks are fontified using the `org-verse' and
,@(and (>= emacs-major-version 27) '(:extend t))
:background "#FFFFD0"))
"My face for tables."
:group 'org-faces))
:group 'org-faces)
#+end_src
#+caption[Shadow Emacs font-lock faces to improve the readability]:
#+caption: Shadow Emacs font-lock faces to improve the readability.
#+name: lst:shadow-emacs-font-lock-faces
#+begin_src emacs-lisp -n
(with-eval-after-load 'emacs
;; Shadow one definition in sh-script.el:
(defface sh-heredoc
;; Shadow one definition in sh-script.el:
(defface sh-heredoc
'((((class color) (background dark))
(:foreground "yellow"))
(((class color) (background light))
@ -559,7 +557,7 @@ verse and quote blocks are fontified using the `org-verse' and
(t
(:weight bold)))
"My face to show a here-document."
:group 'sh-indentation))
:group 'sh-indentation)
(require 'org)
#+end_src