emacs icon indicating copy to clipboard operation
emacs copied to clipboard

error on window-system in appearence.el

Open MichaelPaulukonis opened this issue 10 years ago • 4 comments

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....

MichaelPaulukonis avatar Jul 07 '13 19:07 MichaelPaulukonis

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.

azer avatar Jul 18 '13 01:07 azer

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

MichaelPaulukonis avatar Jul 18 '13 01:07 MichaelPaulukonis

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.

MichaelPaulukonis avatar Jul 18 '13 13:07 MichaelPaulukonis

replace if to when it work

tianhao avatar Apr 29 '16 20:04 tianhao