From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chris Jones Newsgroups: gmane.emacs.help Subject: Re: Compatible .emacs for Gnu and xemacs Date: Mon, 01 Jun 2009 14:38:06 -0400 Organization: PANIX Public Access Internet and UNIX, NYC Message-ID: <87prdndckx.fsf@duck-dodgers.hsd1.ma.comcast.net> References: <23808905.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1243917094 4954 80.91.229.12 (2 Jun 2009 04:31:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Jun 2009 04:31:34 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 02 06:31:32 2009 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 1MBLeu-0000kA-1b for geh-help-gnu-emacs@m.gmane.org; Tue, 02 Jun 2009 06:31:32 +0200 Original-Received: from localhost ([127.0.0.1]:35496 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MBLet-0003Qg-Ex for geh-help-gnu-emacs@m.gmane.org; Tue, 02 Jun 2009 00:31:31 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!novia!news-out.readnews.com!transit3.readnews.com!panix!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 47 Original-NNTP-Posting-Host: c-24-60-101-244.hsd1.ma.comcast.net Original-X-Trace: reader1.panix.com 1243881486 28095 24.60.101.244 (1 Jun 2009 18:38:06 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Mon, 1 Jun 2009 18:38:06 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:bVlogQ/DM16tLtnNTty26CKQLUA= X-Original-Bytes: 2359 Original-Xref: news.stanford.edu gnu.emacs.help:169637 X-Mailman-Approved-At: Tue, 02 Jun 2009 00:27:51 -0400 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:64889 Archived-At: emacsy writes: > Thanks for your responses guys. > What I meant is actually porting/migrating my customizations in .emacs to > work with xmeacs. > So now when starting emacs, it picks up all the > colors/functions/bindings...etc > where when starting xemacs, it does not pick up anything from .emacs and > shows plain basic xemacs. > I learned that xemacs uses other files for customizations like .xemacs? > So how could I make my customizations in .emacs be picked up by xemacs? Here's how I do it: My .emacs starts with this comment: ;; Xemacs doesn't read this file, but we use Xemacs' init file in Emacs. ;; However, Emacs does its own customizations. After a bunch of code useful only in Emacs rather than Xemacs, it ends with: (let ((xemacs-init-file (expand-file-name "init.el" "~/.xemacs"))) (load-file xemacs-init-file)) Inside the xemacs-init-file file, there is the following comment: ;; Note: this file is shared by FSF Emacs and Xemacs, hence the ;; "(featurep 'xemacs)" conditionializations below. Then, code that only is needed or works in Xemacs has (when (featurep 'xemacs) ...) wrapped around it and code that only is needed or works in Emacs has (unless (featurep 'xemacs) ...) wrapped around it. e.g. the following lines are in init.el: (when (featurep 'xemacs) (set-variable 'default-toolbar-visible-p nil)) Hope this helps.