How to maximize Emacs on Windows at startup?

后端 未结 15 1273
天命终不由人
天命终不由人 2020-12-13 03:45

This is driving me crazy: I simply want Emacs to maximize to whatever screen resolution I have at startup. Ideally I like a cross-platform (Windows & Linux) solution tha

15条回答
  •  无人及你
    2020-12-13 04:32

    First, thanks for the tip on the bug with (tool-bar-mode -1); saved me a lot of trouble! I'd rather keep everything within the .emacs file (no registry mods for me), so if you turn on the toolbar before maximizing, and then turn it off again, you'll can maximize nicely:

    (defun maximize-current-frame () "Resizes the current frame to fill the screen"
        (interactive)
        ;; There is a bug in tool-bar-mode that prevents it from being
        ;; maximized, so turn it on before maximizing.
        ;; See http://stackoverflow.com/questions/815239/how-to-maximize-emacs-on-windows-at-startup)
        (tool-bar-mode 1)
        (w32-send-sys-command 61488)
        (tool-bar-mode -1)
    )
    

提交回复
热议问题