[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: terminal & X configuration
From: |
Chuck Siska |
Subject: |
Re: terminal & X configuration |
Date: |
Tue, 23 Apr 2002 11:36:35 -0700 |
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 `<}:.. ((,.-' ((,/