From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Mattie Newsgroups: gmane.emacs.help Subject: Re: Torturedly threaded .emacs portability. [Was: jump between if-fi] Date: Tue, 1 Jan 2008 21:00:00 -0800 Message-ID: <20080101210000.729c2737@reforged> References: <87y7bbpz12.fsf@newsguy.com> <20071231162438.GA1211@muc.de> <87wsqujn1z.fsf@newsguy.com> <20080101155304.GB3830@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1296175053==" X-Trace: ger.gmane.org 1199250091 29435 80.91.229.12 (2 Jan 2008 05:01:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Jan 2008 05:01:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 02 06:01:49 2008 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 1J9vjh-0004In-5k for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Jan 2008 06:01:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J9vjL-00063v-76 for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Jan 2008 00:01:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J9vj7-00063X-8j for help-gnu-emacs@gnu.org; Wed, 02 Jan 2008 00:01:13 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J9vj5-00061z-EM for help-gnu-emacs@gnu.org; Wed, 02 Jan 2008 00:01:12 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J9vj5-00061q-Ao for help-gnu-emacs@gnu.org; Wed, 02 Jan 2008 00:01:11 -0500 Original-Received: from wa-out-1112.google.com ([209.85.146.183]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J9vj4-0002SK-TO for help-gnu-emacs@gnu.org; Wed, 02 Jan 2008 00:01:11 -0500 Original-Received: by wa-out-1112.google.com with SMTP id k34so8715041wah.10 for ; Tue, 01 Jan 2008 21:01:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; bh=8OalIUpBJRXS2TXwvU6SWWuJuLTdGYMQDOl9SVqc2mI=; b=kYCR7sMkTgeJWfx/qXnT7QUqZuRo3NhFD2AbW+dmUxNGqLhtPPDWNk3cmSin32DJ5bFxBSVRgl4QeuqKUC106LTEJPCFfopVY64AuRYhmx8A9JMUVWkage/gRDMx37uA1Srmw1+YDtFvRuDw4IzLZUE5tSLjnlJGSph0RrN8tZ8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; b=oPpMiv3MyaHX863SVdXYj1emaTZvd3uQCxoLFqRbxDCJt/W6kFnRxgTwZJcen1RN8U4++oAV93HNSNFpmJ0vap4gNRoYIpDjMrBVNCTIH9kfiSZavsBTU+E91rOezkVLr3HK700u7eBjzLmuyYos7MqCjSBdP097FxdXefD0nxA= Original-Received: by 10.114.177.1 with SMTP id z1mr14814300wae.7.1199250069179; Tue, 01 Jan 2008 21:01:09 -0800 (PST) Original-Received: from reforged ( [71.217.198.62]) by mx.google.com with ESMTPS id v38sm6833198wah.7.2008.01.01.21.01.06 (version=SSLv3 cipher=OTHER); Tue, 01 Jan 2008 21:01:07 -0800 (PST) In-Reply-To: <20080101155304.GB3830@muc.de> X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.1; i686-pc-linux-gnu) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:50431 Archived-At: --===============1296175053== Content-Type: multipart/signed; boundary="Sig_/eQRDuqLrhmtQ.N5tz=O344_"; protocol="application/pgp-signature"; micalg=PGP-SHA1 --Sig_/eQRDuqLrhmtQ.N5tz=O344_ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 1 Jan 2008 15:53:04 +0000 Alan Mackenzie wrote: > Hi, Reader! >=20 > On Mon, Dec 31, 2007 at 08:29:28PM -0600, reader@newsguy.com wrote: >=20 > [ .... ] >=20 > > On a slightly different subject... if I may torture the threading > > rules a little: > > Speaking of portability... I'd like to get my emacs init files to > > be more portable from one machine to the next but one I'm dealing > > with now has different keyboard responses than most of the others > > and requires differnt keybindings for delete-backward-char and a few > > other things. >=20 > Have a look at the "Key Bindings" in the Emacs FAQ. >=20 > There are several variables you can test to find out what system > you're running under: system-type, system-name, .... Have a look at > page "System Interface" in the Elisp manual. >=20 > > I'd like to include those in .emacs but don't know how to separate > > them off by making them depend on which host emacs is running on. >=20 > > Can you give me a push in that direction? >=20 > (if (eq system-type 'gnu/linux) > (progn > ....) > (...) > ....) (cond ;; linux ((string-equal "gnu/linux" system-type) (load-file "/usr/share/emacs/site-lisp/site-gentoo.el")) ;; darwin ((string-equal "darwin" system-type) (load-file (concat my-emacs-dir "darwin.el"))) ) the cond form is a bit easier to extend as the platform list grows. > (if (eq window-system 'x) .....) ; See elisp manual page "Window > Systems" >=20 > > How to access the env variable HOSTNAME or slurp the results of > > the hostname shell command and make the keybindings dependant on the > > results.=20 >=20 > (getenv "HOSTNAME") ; See elisp manual page "System Environment" >=20 > > I've seen examples of something similar where the code tests if > > its fsf emacs or Xemacs as a condition. >=20 > I think you mean "GNU Emacs". ;-) ["fsf emacs" is regarded as rude > by the Emacs project, for reasons I don't fully understand.] >=20 > (if (featurep 'xemacs) ....) >=20 --Sig_/eQRDuqLrhmtQ.N5tz=O344_ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHexpQdfRchrkBInkRAlHOAKCY2F6g+mcWfMNXfRtbPMYx2zzZvgCePNzo CS2H1smvN7AXG6EY+MrbF9Q= =giKz -----END PGP SIGNATURE----- --Sig_/eQRDuqLrhmtQ.N5tz=O344_-- --===============1296175053== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============1296175053==--