dot/emacs: Use `window-system-default-frame-alist'.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 11 Jan 2010 09:50:02 +0000 (09:50 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 11 Jan 2010 09:54:32 +0000 (09:54 +0000)
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
el/dot-emacs.el

index d3c9251..e5ae0b8 100644 (file)
--- a/dot/emacs
+++ b/dot/emacs
         (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.
 
index e9390dd..a55843c 100644 (file)
@@ -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.