Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error on window-system in appearence.el #4

Open
MichaelPaulukonis opened this issue Jul 7, 2013 · 4 comments
Open

error on window-system in appearence.el #4

MichaelPaulukonis opened this issue Jul 7, 2013 · 4 comments

Comments

@MichaelPaulukonis
Copy link

I'm running GNU Emacs 24.0.50.1 (i386-mingw-nt6.1.7601) of 2010-10-19 on LENNART-69DE564

With emacs.js just download today (2013.07.07)

appearance.el likes to crash my whole startup with the following error [abridged]:

Debugger entered--Lisp error: (invalid-function (tool-bar-mode -1))
  ((tool-bar-mode -1) (menu-bar-mode -1) (scroll-bar-mode -1))
  (if window-system ((tool-bar-mode -1) (menu-bar-mode -1) (scroll-bar-mode -1)))
  eval-buffer(#<buffer  *load*<2>> nil "d:/Dropbox/Emacs/site-lisp/emacs.js/config/appearance.el" nil t)  ;

(It is not running in the HOME directory; I've explicitly changed init.el to have +home-dir+ point elsewhere.)

The culprit appears to be the following code:

(if window-system
    ((tool-bar-mode -1)
     (menu-bar-mode -1)
     (scroll-bar-mode -1)))

Changing it to

(if window-system
    (progn (tool-bar-mode -1)
           (menu-bar-mode -1)
           (scroll-bar-mode -1)))

allows everything to work. My emaccs-fu is weak, but isn't the progn actually required to execute multiple statements? Or is it some other quirk of my setup? I haven't submitted a pull-request, as I'm never really sure with elisp on windows....

@azer
Copy link
Owner

azer commented Jul 18, 2013

that part of code fails to work on different platforms unfortunately and I don't have a good idea for how to fix it. we can completely delete it and let people configure it from custom.el file.

@MichaelPaulukonis
Copy link
Author

Does the addition of progn fail on some platforms, or is it other parts of that code?

@MichaelPaulukonis
Copy link
Author

I wouldn't mind it being in custom.el however, as I like having the menu-bar and scroll-bar hanging around. Menu-bar, certainly, as it's a quick refresher for unfamiliar, or long-unused modes. The tool-bar is pretty ugly.

If this is being pitched to non-emacs users, getting an IDE environment that has tools similar to other IDEs might be a good idea. tool-bar I don't know about, but jettisoning the menu-bar and the scroll-bar might be offputting for some.

@tianhao
Copy link
Contributor

tianhao commented Apr 29, 2016

replace if to when it work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants