diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2009-04-25 14:25:06 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2009-04-25 14:25:06 +0000 |
commit | 4a0c006124a09160d37a9d868cf32803231f437d (patch) | |
tree | 636c0a96bd7f6814f1a68f9db29a05607b3e4056 /lisp/startup.el | |
parent | 3eb92ec0f1a14597c8897388a038a6f2eab687d4 (diff) | |
download | emacs-4a0c006124a09160d37a9d868cf32803231f437d.tar.gz |
* startup.el (normal-top-level): Implement a work-around to handle
changes to face-font-rescale-alist during initialization (Bug#1785).
Diffstat (limited to 'lisp/startup.el')
-rw-r--r-- | lisp/startup.el | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index 7a1f9dc392d..6dd2fb7e35c 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -499,7 +499,8 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (delete (concat "PWD=" pwd) process-environment))))) (setq default-directory (abbreviate-file-name default-directory)) - (let ((menubar-bindings-done nil)) + (let ((menubar-bindings-done nil) + (old-face-font-rescale-alist face-font-rescale-alist)) (unwind-protect (command-line) ;; Do this again, in case .emacs defined more abbreviations. @@ -540,6 +541,19 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (not (and initial-window-system (not noninteractive) (not (eq initial-window-system 'pc))))) + + ;; FIXME: The user's init file may change + ;; face-font-rescale-alist. However, the default face + ;; already has an assigned font object, which does not take + ;; face-font-rescale-alist into account. For such + ;; situations, we ought to have a way to find all font + ;; objects and regenerate them; currently we do not. As a + ;; workaround, we specifically reset te default face's :font + ;; attribute here. See bug#1785. + (unless (eq face-font-rescale-alist + old-face-font-rescale-alist) + (set-face-attribute 'default nil :font (font-spec))) + ;; Modify the initial frame based on what .emacs puts into ;; ...-frame-alist. (if (fboundp 'frame-notice-user-settings) |