all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: martin rudalics <rudalics@gmx.at>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: Note on e65c307 breaks font-height
Date: Sun, 29 May 2016 10:14:08 -0700	[thread overview]
Message-ID: <574B2360.7070809@cs.ucla.edu> (raw)
In-Reply-To: <574AF21D.30602@gmx.at>

[-- Attachment #1: Type: text/plain, Size: 796 bytes --]

martin rudalics wrote:

> I have no idea what the --eval is for.

I put that --eval in only because Rostislav Svoboda's bug report mentioned it 
and I thought that it was needed to reproduce the bug.

>  > And in both Emacs 24.5 and emacs-25 if I reapply .emacs the
>  > display changes to the same (nicer) appearance.
>
> But in Emacs 25 I have to _manually_ reapply .emacs.

Yes, that is annoying. But I had to manually reapply .emacs in Emacs 24.5 too, 
with the scenario involving --eval. So this was not a regression for me in that 
case, which means I haven't reproduced your bug yet....

> dynamic-setting-handle-config-changed-event: Symbol’s value as variable is void:
> default-face-font-user-spec

Ach, that was a stupid last-minute typo. Revised patch attached.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-face-attribute-default-settings.patch --]
[-- Type: text/x-diff; name="0001-Fix-face-attribute-default-settings.patch", Size: 1840 bytes --]

From 7838d6e99dc0c191e16c4bf8849a1696ef7f2167 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sun, 29 May 2016 10:03:05 -0700
Subject: [PATCH] Fix face attribute default settings

Problem reported by Martin Rudalics in:
http://lists.gnu.org/archive/html/emacs-devel/2016-05/msg00557.html
* lisp/dynamic-setting.el (font-setting-change-default-font):
Don't confuse default face font user spec with frame font.
---
 lisp/dynamic-setting.el | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/lisp/dynamic-setting.el b/lisp/dynamic-setting.el
index 6021a3b..b1d2397 100644
--- a/lisp/dynamic-setting.el
+++ b/lisp/dynamic-setting.el
@@ -53,17 +53,17 @@ font-setting-change-default-font
 	  (set-frame-font new-font nil frame-list)
 	;; Just redraw the existing fonts on all frames:
 	(dolist (f frame-list)
-	  (let ((frame-font
-		 (or (font-get (face-attribute 'default :font f 'default)
-			       :user-spec)
-		     (frame-parameter f 'font-parameter))))
+	  (let ((user-spec (font-get (face-attribute 'default :font f 'default)
+				     :user-spec))
+		(frame-font (frame-parameter f 'font-parameter)))
 	    (when frame-font
-	      (set-frame-parameter f 'font-parameter frame-font)
+	      (set-frame-parameter f 'font-parameter frame-font))
+	    (when user-spec
 	      (set-face-attribute 'default f
 				  :width 'normal
 				  :weight 'normal
 				  :slant 'normal
-				  :font frame-font))))))))
+				  :font user-spec))))))))
 
 (defun dynamic-setting-handle-config-changed-event (event)
   "Handle config-changed-event on the display in EVENT.
@@ -92,4 +92,3 @@ dynamic-setting-handle-config-changed-event
 
 (define-key special-event-map [config-changed-event]
   'dynamic-setting-handle-config-changed-event)
-
-- 
2.7.4


  reply	other threads:[~2016-05-29 17:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26 10:44 Note on e65c307 breaks font-height martin rudalics
2016-05-26 15:05 ` Paul Eggert
2016-05-26 15:22   ` Eli Zaretskii
2016-05-26 15:33     ` Paul Eggert
2016-05-26 15:50       ` Eli Zaretskii
2016-05-26 15:57         ` Paul Eggert
2016-05-26 16:33           ` Eli Zaretskii
2016-05-27 13:18   ` martin rudalics
2016-05-28 10:17     ` Eli Zaretskii
2016-05-29 13:43       ` martin rudalics
2016-05-29 15:07         ` Eli Zaretskii
2016-05-30  8:00           ` martin rudalics
2016-06-04  7:28             ` Eli Zaretskii
2016-06-04  9:48               ` martin rudalics
2016-06-04 10:52                 ` Eli Zaretskii
2016-06-04 13:07                   ` martin rudalics
2016-05-28 10:38     ` Paul Eggert
2016-05-29 13:43       ` martin rudalics
2016-05-29 17:14         ` Paul Eggert [this message]
2016-05-30  8:00           ` martin rudalics
2016-05-26 15:16 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=574B2360.7070809@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.