From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Newsgroups: gmane.emacs.help Subject: Nice Emacs Lisp Date: Wed, 18 Mar 2009 16:09:01 +0100 Organization: Sebastien Vauban Message-ID: <87mybiamwi.fsf@mundaneum.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1237390854 3718 80.91.229.12 (18 Mar 2009 15:40:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Mar 2009 15:40:54 +0000 (UTC) To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Wed Mar 18 16:42:11 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 1LjxuC-0006ru-EB for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Mar 2009 16:42:08 +0100 Original-Received: from localhost ([127.0.0.1]:44701 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ljxsp-0001NQ-V0 for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Mar 2009 11:40:43 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news2.glorb.com!news2.euro.net!xlned.com!feeder3.xlned.com!newsfeed.kpn.net!pfeed09.wxs.nl!news.motzarella.org!motzarella.org!news.motzarella.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 45 Original-X-Trace: news.eternal-september.org U2FsdGVkX19LUgSQs2N30zTzvDwlAVeJn7UqlY7vHwVmFzCeRFQaYEYjwPAEBjpq132+hlJ9hcfISqw8v2pW+mKVkBBDWPFYo6Dyj+xktvgVgm/kl+IgiI9lPVaTVcQSqiGWFf6BalM= Original-X-Complaints-To: Please send complaints to abuse-xVLBGngCCsvFKiuWU8UaTg@public.gmane.org with full headers Original-NNTP-Posting-Date: Wed, 18 Mar 2009 15:09:02 +0000 (UTC) X-Auth-Sender: U2FsdGVkX1/jxAgro38cFTODSobTDPMoZzdDOeD4tIM= X-Archive: encrypt Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAElBMVEUAAAAAAP+LRRP0pGC+vr7///+7mT1iAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9cBBwMODhglKe4AAAEsSURBVCjPbZNBboQwDEV/Cd4X9QJRThApmn0XYW+Jyf2v0m+HhqDBgiAe9rcTG7QHw/1Vn2Ar8gBb/ocywSN3qK9T3z4eFDB4eApocBpeBs1RSykoJd8gQcm8pGmHXFso3ajnmsqV0TnYDQkOfXUfN5NwaI7AWTVOyEhcu1aHmdWItHddUVUcUgUBCkitu8V6ditHVOVdqzl2EQ1ZVGTbdK0V7cqn8vWzoU5Q/bF9Y/Y0cRU1xwkys5dJ+Dt6pBDWifcNQml8Gh2JVmPSoQzo7en0grswkxrUGYJ70hSxxAGr7ZMwYcHIzprpi7TENEE1xtiYxixRlCfPBsUUrwHD7uGIwATrbnODJcVrPpVn3hxiGloem/S+z3CtuzUSMo83N4DPH+F0evwR3P4A2k+75838OKQAAAAASUVORK5CYII= X-Www-site: Under construction... Cancel-Lock: sha1:dFb4siiA1HmntfPSRhaXpPzHzP4= sha1:7IDsH2isFQpvPMjxhEyOqqfZycI= User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.60 (gnu/linux) Original-Xref: news.stanford.edu gnu.emacs.help:167754 X-BeenThere: help-gnu-emacs-mXXj517/zsQ@public.gmane.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-mXXj517/zsQ@public.gmane.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.help:63049 Archived-At: Hello, I'd like to mix Linux and Windows settings in my .emacs file, so that I can use GNU Emacs on both platforms with the same init file. Currently, I've defined: --8<---------------cut here---------------start------------->8--- (defmacro GNULinux (&rest body) (list 'if (string-match "linux" (prin1-to-string system-type)) (cons 'pro= gn body))) (defmacro Windows (&rest body) (list 'if (string-match "windows" (prin1-to-string system-type)) (cons 'p= rogn body))) --8<---------------cut here---------------end--------------->8--- and I write (for example): --8<---------------cut here---------------start------------->8--- (setq bcc-cache-directory (concat (Windows "~/.emacs.d/byte-cache-ms-windows") (GNULinux "~/.emacs.d/byte-cache-linux"))) --8<---------------cut here---------------end--------------->8--- But do you know some better way to write the above (the concat function is = not that clear there...), while avoiding such a construction: --8<---------------cut here---------------start------------->8--- (Windows (setq bcc-cache-directory "~/.emacs.d/byte-cache-ms-windows")) (GNULinux (setq bcc-cache-directory "~/.emacs.d/byte-cache-linux")) --8<---------------cut here---------------end--------------->8--- as I hate duplicating things (error-prone when changing one and not the other). Best regards, Seb --=20 S=C3=A9bastien=C2=A0Vauban