From 2dd9081f5f0d805d4b99fd087d29c9cf9da4815f Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Mon, 11 Jan 2010 09:50:02 +0000 Subject: [PATCH] dot/emacs: Use `window-system-default-frame-alist'. Rather than building `default-frame-alist' conditionally according to the prevailing `window-system'. We can now make do without the `mdw-set-frame-parameters' hack. Depending on when `window-system-default-frame-alist' was introduced, we may yet need a compatibility hack for Emacs 22. --- dot/emacs | 14 ++++++-------- el/dot-emacs.el | 11 ----------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/dot/emacs b/dot/emacs index d3c9251..e5ae0b8 100644 --- a/dot/emacs +++ b/dot/emacs @@ -382,14 +382,12 @@ (cursor-color . "red")) (if mdw-black-background '((background-mode . dark)) - '((background-mode . light))) - (and (eq window-system 'x) - '((font . "6x13"))) - (and (eq window-system 'pm) - '((font . "-os2-System VIO-medium-r-normal--*-40-*-*-m-*-cp850") - (menu-font . "8.Helv") - (background-color . "lightgrey"))) - default-frame-alist)) + '((background-mode . light))))) +(setq window-system-default-frame-alist + '((pm (font . "-os2-System VIO-medium-r-normal--*-40-*-*-m-*-cp850") + (menu-font . "8.Helv") + (background-color . "lightgrey")) + (nil (menu-bar-lines . 0)))) ;; Other frame fiddling. diff --git a/el/dot-emacs.el b/el/dot-emacs.el index e9390dd..a55843c 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -776,17 +776,6 @@ doesn't match any of the regular expressions in (run-with-idle-timer 0 nil #'x-close-connection frame-display)))) (add-hook 'delete-frame-functions 'mdw-last-one-out-turn-off-the-lights) -(defvar mdw-frame-parameters-alist - '((nil (menu-bar-lines . 0)))) -(defun mdw-set-frame-parameters (frame) - (let ((params (assq (if (fboundp 'window-system) - (window-system frame) - window-system) - mdw-frame-parameters-alist))) - (when params - (modify-frame-parameters frame (cdr params))))) -(add-hook 'after-make-frame-functions 'mdw-set-frame-parameters) - ;;;-------------------------------------------------------------------------- ;;; General fontification. -- 2.11.0