[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e065d08fa7: Simplify window-char-pixel-* code slightly
From: |
Lars Ingebrigtsen |
Subject: |
master e065d08fa7: Simplify window-char-pixel-* code slightly |
Date: |
Fri, 29 Apr 2022 09:52:35 -0400 (EDT) |
branch: master
commit e065d08fa73ee128cb8373a5c246dc063bc41624
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Simplify window-char-pixel-* code slightly
* lisp/window.el (window-char-pixel-width)
(window-char-pixel-height): Simplify code slightly.
---
lisp/window.el | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/lisp/window.el b/lisp/window.el
index bb4d51da5f..5ceec77bd3 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10488,8 +10488,7 @@ If FACE is nil or omitted, the default face is used.
If FACE is
remapped (see `face-remapping-alist'), the function returns the
information for the remapped face."
(with-selected-window (window-normalize-window window t)
- (let* ((face (if face face 'default))
- (info (font-info (face-font face)))
+ (let* ((info (font-info (face-font (or face 'default))))
(width (aref info 11)))
(if (> width 0)
width
@@ -10503,9 +10502,7 @@ If FACE is nil or omitted, the default face is used.
If FACE is
remapped (see `face-remapping-alist'), the function returns the
information for the remapped face."
(with-selected-window (window-normalize-window window t)
- (let* ((face (if face face 'default))
- (info (font-info (face-font face))))
- (aref info 3))))
+ (aref (font-info (face-font (or face 'default))) 3)))
(defun window-max-characters-per-line (&optional window face)
"Return the number of characters that can be displayed on one line in WINDOW.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master e065d08fa7: Simplify window-char-pixel-* code slightly,
Lars Ingebrigtsen <=