[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-modern df199695e6 3/3: org-modern--update-label-fac
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-modern df199695e6 3/3: org-modern--update-label-face: Simplify |
Date: |
Tue, 13 Sep 2022 07:58:23 -0400 (EDT) |
branch: externals/org-modern
commit df199695e652267e03c1fb05e5f290ee0dbc7f00
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
org-modern--update-label-face: Simplify
---
org-modern.el | 37 ++++++++++++++++++-------------------
1 file changed, 18 insertions(+), 19 deletions(-)
diff --git a/org-modern.el b/org-modern.el
index 68fc8719b8..0007249bee 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -523,25 +523,24 @@ the font.")
(defun org-modern--update-label-face ()
"Update border of the `org-modern-label' face."
- (when (facep 'org-modern-label)
- (set-face-attribute
- 'org-modern-label nil
- :box
- (when org-modern-label-border
- (let ((border (if (eq org-modern-label-border 'auto)
- (max 3 (cond
- ((integerp line-spacing)
- line-spacing)
- ((floatp line-spacing)
- (ceiling (* line-spacing
(frame-char-height))))
- (t (/ (frame-char-height) 10))))
- org-modern-label-border)))
- (list :color (face-attribute 'default :background nil t)
- :line-width
- ;; Emacs 28 supports different line horizontal and vertical
line widths
- (if (>= emacs-major-version 28)
- (cons 0 (- border))
- (- border))))))))
+ (set-face-attribute
+ 'org-modern-label nil
+ :box
+ (when org-modern-label-border
+ (let ((border (if (eq org-modern-label-border 'auto)
+ (max 3 (cond
+ ((integerp line-spacing)
+ line-spacing)
+ ((floatp line-spacing)
+ (ceiling (* line-spacing (frame-char-height))))
+ (t (/ (frame-char-height) 10))))
+ org-modern-label-border)))
+ (list :color (face-attribute 'default :background nil t)
+ :line-width
+ ;; Emacs 28 supports different line horizontal and vertical line
widths
+ (if (>= emacs-major-version 28)
+ (cons 0 (- border))
+ (- border)))))))
(defun org-modern--update-fringe-bitmaps ()
"Update fringe bitmaps."