To disable the scrollbar in emacs I added (toggle-scroll-bar -1) to the my .emacs file and it works great when I run emacs outside of console mode. However when I run emacs in the terminal I get the error Symbol's function definition is void: toggle-scroll-bar

I'm running Emacs 23.3.1

heres the trace when I run --debug-init

    1 Debugger entered--Lisp error: (void-function scroll-bar-mode)                
    2   (scroll-bar-mode -1)                                                       
    3   eval-buffer(#<buffer  *load*> nil "/Users/neil/.emacs.d/init.el" nil t)  ;$
    4   load-with-code-conversion("/Users/neil/.emacs.d/init.el" "/Users/neil/.ema$
    5   load("/Users/neil/.emacs.d/init" t t)                                      
    6   #[nil "^H\205\264^@   \306=\203^Q^@\307^H\310Q\2027^@ \311=\2033^@\312\307$
    7   command-line()                                                             
    8   normal-top-level()

Though I'm unsure of the cause of this error. I did manage to find a quick fix to my problem here

So I added the following to my .emacs file

(if window-system
 (progn
  (scroll-bar-mode -1)))
link|improve this question

80% accept rate
Emacs probably gave you a Warnings buffer telling you to run emacs with the --debug-init option to get a complete error backtrace. Try that and add that information to the question. Along with the Emacs version M-x emacs-version. That chunk of code works just fine with Emacs 23.2. – Trey Jackson Jul 21 '11 at 21:48
@Trey Jackson, I added the details you requested, I seem to be running Emacs 23.1, so I'll try upgrading. Thank you for your suggestions. – bneil Jul 22 '11 at 16:23
Very odd. Ok, next test is running Emacs w/out your .emacs, emacs -nw -q, and then in the scratch buffer, type (scroll-bar-mode -1)C-j and see if you get an error. That function is distributed with Emacs in the scroll-bar.el package, so I'm guessing your .emacs has something odd, or the Emacs wasn't installed properly. – Trey Jackson Jul 22 '11 at 16:25
I get this error upon doing that Debugger entered--Lisp error: (void-function scroll-bar-mode) (scroll-bar-mode -1) eval((scroll-bar-mode -1)) eval-last-sexp-1(t) eval-last-sexp(t) eval-print-last-sexp() call-interactively(eval-print-last-sexp nil nil) – bneil Jul 22 '11 at 16:30
Here is my .emacs file pastebin.com/4mYE91Ne too – bneil Jul 22 '11 at 16:34
show 2 more comments
feedback

1 Answer

My guess is when you open emacs -nw emacs doesn't even bother to load scroll-bar.el. thats why it is having trouble to find the function toggle-scroll-bar.
may be instead if you put
(scroll-bar-mode -1)
probably work.

link|improve this answer
(toggle-scroll-bar -1) works just fine in emacs -nw for Emacs 23.2... – Trey Jackson Jul 21 '11 at 21:45
feedback

Your Answer

 
or
required, but never shown

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