[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113410: Fix bug #14838 with slow scrolling with cer
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] trunk r113410: Fix bug #14838 with slow scrolling with certain fonts. |
Date: |
Sat, 13 Jul 2013 07:28:49 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113410
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/14838
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2013-07-13 10:26:43 +0300
message:
Fix bug #14838 with slow scrolling with certain fonts.
lisp/simple.el (default-font-height): Don't call font-info if the
frame's default font didn't change since the frame was created.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/simple.el simple.el-20091113204419-o5vbwnq5f7feedwu-403
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-07-13 04:44:19 +0000
+++ b/lisp/ChangeLog 2013-07-13 07:26:43 +0000
@@ -1,3 +1,9 @@
+2013-07-13 Eli Zaretskii <address@hidden>
+
+ * simple.el (default-font-height): Don't call font-info if the
+ frame's default font didn't change since the frame was created.
+ (Bug#14838)
+
2013-07-13 Leo Liu <address@hidden>
* ido.el (ido-read-file-name): Guard against non-symbol value.
=== modified file 'lisp/simple.el'
--- a/lisp/simple.el 2013-07-12 08:35:42 +0000
+++ b/lisp/simple.el 2013-07-13 07:26:43 +0000
@@ -4739,10 +4739,15 @@
(defun default-font-height ()
"Return the height in pixels of the current buffer's default face font."
- (cond
- ((display-multi-font-p)
- (aref (font-info (face-font 'default)) 3))
- (t (frame-char-height))))
+ (let ((default-font (face-font 'default)))
+ (cond
+ ((and (display-multi-font-p)
+ ;; Avoid calling font-info if the frame's default font was
+ ;; not changed since the frame was created. That's because
+ ;; font-info is expensive for some fonts, see bug #14838.
+ (not (string= (frame-parameter nil 'font) default-font)))
+ (aref (font-info default-font) 3))
+ (t (frame-char-height)))))
(defun default-line-height ()
"Return the pixel height of current buffer's default-face text line.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113410: Fix bug #14838 with slow scrolling with certain fonts.,
Eli Zaretskii <=