[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Disable certain commands in non window mode
From: |
Joost Kremers |
Subject: |
Re: Disable certain commands in non window mode |
Date: |
25 Sep 2008 09:36:33 GMT |
User-agent: |
slrn/0.9.8.1 (Linux) |
MiH wrote:
> These are certain statements in my .emacs file.
>
> (add-to-list 'load-path "~/.emacs.d")
> (global-font-lock-mode t)
> (set-scroll-bar-mode 'right)
> (require 'color-theme)
> (color-theme-initialize)
> (color-theme-whateveryouwant)
> (mwheel-install)
>
> ;; rest of the .emacs file
>
> The thing is I want to disable loading of the above statements while
> in non-window (emacs -nw) mode, but want them while using X11. Since I
> am new to elisp, I am not yet quite sure how to do this.
check the value of the variable WINDOW-SYSTEM: as per the documentation, it
is nil if emacs is running in a terminal. so you can do:
(when window-system
(add-to-list 'load-path "~/.emacs.d")
(global-font-lock-mode t)
(set-scroll-bar-mode 'right)
(require 'color-theme)
(color-theme-initialize)
(color-theme-whateveryouwant)
(mwheel-install))
--
Joost Kremers joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)