all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chris Jones <clj@panix.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Compatible .emacs for Gnu and xemacs
Date: Mon, 01 Jun 2009 14:38:06 -0400	[thread overview]
Message-ID: <87prdndckx.fsf@duck-dodgers.hsd1.ma.comcast.net> (raw)
In-Reply-To: mailman.8292.1243880888.31690.help-gnu-emacs@gnu.org

emacsy <hisnawi@hotmail.com> 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.


  parent reply	other threads:[~2009-06-01 18:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-01  1:46 Compatible .emacs for Gnu and xemacs emacsy
2009-06-01  8:38 ` Peter Dyballa
2009-06-01 16:26   ` Drew Adams
2009-06-01 18:27 ` emacsy
2009-06-01 18:31   ` Lennart Borgman
2009-06-01 18:37   ` Drew Adams
2009-06-01 18:48   ` Peter Dyballa
     [not found] ` <mailman.8292.1243880888.31690.help-gnu-emacs@gnu.org>
2009-06-01 18:38   ` Chris Jones [this message]
2009-06-01 19:01 ` Andreas Röhler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87prdndckx.fsf@duck-dodgers.hsd1.ma.comcast.net \
    --to=clj@panix.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.