In Aquamacs, I have scrollbars turned off: (scroll-bar-mode -1).

But when I do New Buffer in New Frame, i.e. ⌘-N, the new frame has a scrollbar. How do I make it so new frames have scrollbars off by default?


The following, which you can add to ~/.emacs or wherever your init script happens to live, should solve this problem by disabling scrollbars on newly created frames, immediately after they're created:

(add-hook 'after-make-frame-functions
          '(lambda (frame)
             (modify-frame-parameters frame
                                      '((vertical-scroll-bars . nil)
                                        (horizontal-scroll-bars . nil)))))

Works for me in Emacs 24.3 on both Linux and Darwin; Aquamacs is weird, so your mileage may vary, but I doubt it's weird enough to break this.

  • This worked! Do you know how I would add a line to disable Aquamacs' tabbar mode? I have Show Tabs unchecked but every time I create a new window, Aquamacs turns it back on. I tried adding this line to your code above but it didn't help. (tabbar-mode nil nil (tabbar)) – incandescentman Aug 20 '13 at 5:10
  • 1
    @PeterSalazar Not as such; <rant class="opinionated">Aquamacs lasted all of five minutes with me before I trashed it in favor of this Mac port, which is vanilla GNU Emacs 24.3 with (very good) Darwin/Aqua patches, rather than trying to Frankenstein everything into the Aqua school of UI thought, the way Aquamacs does.</rant> Have you tried (tabbar-mode -1) in your init file? – Aaron Miller Aug 20 '13 at 5:30
  • yup, I do have that line also. It works for a while, until I start creating new frames and new tabs. – incandescentman Aug 20 '13 at 8:31
  • 1
    @PeterSalazar I just grabbed a fresh copy of Aquamacs and fired it up to try this out; while I didn't make a systematic study, doing M-x customize-group RET tabbar RET and setting 'Tabbar Mode' to 'Off' seems to have done the trick. The value of tabbar-mode after I'd done so was nil, so it's possible either (setq tabbar-mode nil) or just (tabbar-mode nil) will have the desired effect, but Customize may be partaking of special magic, too, and I'd thus recommend trying that route if you haven't already done so. – Aaron Miller Aug 20 '13 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.