From 255ee1fce8e9f11d7fa6f477033369fa47539c17 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Thu, 17 Dec 2009 17:52:28 +0000 Subject: [PATCH] el/dot-emacs.el: Remove menu bar from dumb terminals. Now that Emacs can work on different terminal kinds at the same time, it seems sensible that one might want different parameters for them. But it won't let me. So I have an alist indexed by `window-system'. --- el/dot-emacs.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/el/dot-emacs.el b/el/dot-emacs.el index f66b833..df15026 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -742,6 +742,17 @@ 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