From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Chuck Siska Newsgroups: gmane.emacs.help Subject: Re: terminal & X configuration Date: Tue, 23 Apr 2002 11:36:35 -0700 Organization: Conexant Systems, Inc. Sender: help-gnu-emacs-admin@gnu.org Message-ID: <3CC5A9B3.2D65748E@nb.conexant.com> References: <15557.13662.166399.990763@localhost.localdomain> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1019586881 9293 127.0.0.1 (23 Apr 2002 18:34:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 23 Apr 2002 18:34:41 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17057g-0002Pl-00 for ; Tue, 23 Apr 2002 20:34:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17053Y-00065A-00; Tue, 23 Apr 2002 14:30:24 -0400 Original-Received: from cnxtsmtp2.conexant.com ([198.62.9.253]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17050e-0005v2-00 for ; Tue, 23 Apr 2002 14:27:24 -0400 Original-Received: from npbsmtp1.conexant.com (npbsmtp1.nb.conexant.com [157.152.161.153]) by cnxtsmtp2.conexant.com (8.9.3/8.9.3) with ESMTP id LAA05522 for ; Tue, 23 Apr 2002 11:27:23 -0700 (PDT) Original-Received: from nb.conexant.com ([172.19.41.119]) by npbsmtp1.conexant.com (Lotus Domino Release 5.0.9a) with ESMTP id 2002042311271094:35420 ; Tue, 23 Apr 2002 11:27:10 -0700 X-Mailer: Mozilla 4.73 [en] (Win98; U) X-Accept-Language: en Original-To: Help Gnu Emacs X-MIMETrack: Itemize by SMTP Server on NPBSMTP1/Server/Conexant(Release 5.0.9a |January 7, 2002) at 04/23/2002 11:27:11 AM, Serialize by Router on NPBSMTP1/Server/Conexant(Release 5.0.9a |January 7, 2002) at 04/23/2002 11:27:12 AM, Serialize complete at 04/23/2002 11:27:12 AM Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:146 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:146 luis -- i run the same .emacs file on unix, mswind95/98 and mswindnt. it's done in 2 parts (although it can be done in one part). one part is to define a function to describe the system characteristics: (message "Set my cs-what-env...") (defun cs-what-env () "Returns a string indicating what kind of environment emacs runs in. 'E.g., Windows_95', 'Windows_NT', 'X11_windows'." (interactive) (let ((doze32 (if (>= emacs-major-version 20) 'w32 'win32))) (cond ((eq window-system doze32) (or (getenv "OS") "Windows_95")) ((eq window-system 'x) (concat "X" window-system-version "_windows")) (t "Console")))) the second part is to use the defined function to choose what to do in a given circumstance: (message "Set my fonts...") (let ((sys-env (cs-what-env))) (cond ;;---------------------------------------- Unix ---- ((string= "X11_windows" sys-env) (message "Set my X11_windows fonts...") (setq cs-default-font "5x8") (setq initial-frame-alist (append '((width . 100) (height . 50)) initial-frame-alist)) (setq cs-default-font "5x8") ) ;;---------------------------------------- MSwind ---- ((or (string= "Windows_95" sys-env) (string= "Windows_NT" sys-env)) (message "Set my MSwind fonts...") ; set font to terminal, regular, 6 point. (setq cs-default-font "-*-Terminal-normal-r-*-*-8-60-*-*-c-*-*-oem-") ) (t nil))) good luck. -- chuck "Luis O. Silva" wrote: > > Dearest Emacs Community, > > Would you please help me to know how I can have different > configurations of my Emacs for working in X and for > working on a terminal (emacs -nw), without having to call > different dot-files? > > Thank you very much in advance. > > Sincerely yours, > luis > > -- > Luis Octavio Silva P. > St. Petersburg State University. > 66/3 Botanicheskaya St., Apt.119/2 > Stary Peterhof > St. Petersburg, Russia. > > _______________________________________________ > Help-gnu-emacs mailing list > Help-gnu-emacs@gnu.org > http://mail.gnu.org/mailman/listinfo/help-gnu-emacs -- |\_/\_.-'""``:-._ What is life without looking for . . `; -._ )-;-,_`) the next cute little bug to play with? v_,- _ ),(,.\ ``-' _.- _.,-_/ / ((.' -- chuck.siska@conexant.com `<}:.. ((,.-' ((,/