From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: Disable certain commands in non window mode Date: 25 Sep 2008 09:36:33 GMT Message-ID: References: <16c4e049-5c92-42f2-bfa9-a731c6d0bd03@k37g2000hsf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1222336312 15628 80.91.229.12 (25 Sep 2008 09:51:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Sep 2008 09:51:52 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 25 11:52:50 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KinWj-000133-KH for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Sep 2008 11:52:49 +0200 Original-Received: from localhost ([127.0.0.1]:34100 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KinVh-0006yT-Io for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Sep 2008 05:51:45 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 34 Original-X-Trace: individual.net nIy6a+D39C7v1cdUUejv9QEOCSnVhZnMjzY2cQ0cHm6ByjD/D6 Cancel-Lock: sha1:cp821A0TnhlUwzL9Ey2Uneol44w= Mail-Copies-To: nobody X-Editor: Emacs of course! User-Agent: slrn/0.9.8.1 (Linux) Original-Xref: news.stanford.edu gnu.emacs.help:162712 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:58053 Archived-At: 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)