3

When I try to disable the toolbar in my .emacs using the following command :

(custom-set-variables
  '(tool-bar-mode nil)
)

or (UPDATE) following :

(tool-bar-mode -1)

the window's maximum size is reduced to only a part of the screen.

It even isn't in 'restored window size modus', but it really thinks it is maximized, so maximizing it again (using a w32-send command for example) has no effect.

If I apply the same command after starting up in lisp-interatction mode, this behaviour does not occur.

UPDATE : VERY RELATED : How to maximize Emacs on Windows at startup?

Although this question is about removing toolbars and the other about maximizing state, it turns out the question is about the very same issue : it's the toolbar there too that is preventing the user to maximze his window.

Community
  • 1
  • 1
Peter
  • 47,963
  • 46
  • 132
  • 181

3 Answers3

3

That's a bug, please report it with M-x report-emacs-bug.

Stefan
  • 27,908
  • 4
  • 53
  • 82
3

This is indeed a bug. However an easy wokaround is supplied here :

How to maximize Emacs on Windows at startup?

kenny-jensen

for convenience, I repeat it here :

(w32-send-sys-command #xf030)
(add-hook 'window-setup-hook (lambda () (tool-bar-mode -1)))
Community
  • 1
  • 1
Peter
  • 47,963
  • 46
  • 132
  • 181
0

to disable a minor mode give negative argument

(tool-bar-mode -1)

UPDATE: At least on linux, it doesn't shrink

kindahero
  • 5,817
  • 3
  • 25
  • 32