emacs설정파일 - 터미널별로 다르게 설정하기

auditory의 이미지

하나의 .emacs 파일을 여러 기계에서 사용하려고 합니다.

특히 문제가 되는 부분이,

cygwin 터미널에서 사용할때와 linux 터미널에서 사용할때 문제가 되는데요..

cygwin용 설정들을 cygwin-setup.el 파일에 저장하고,
cygwin 터미널에서 emacs를 실행한 경우에만 이 파일을 로드하려고 합니다.

방법이 있을까요?

dreamstorm의 이미지

system-type 이란 변수를 보시면 현재 환경을 알수있습니다.

Documentation:
Value is symbol indicating type of operating system you are using.
Special values:
`gnu' compiled for a GNU Hurd system.
`gnu/linux' compiled for a GNU/Linux system.
`darwin' compiled for Darwin (GNU-Darwin, Mac OS X, ...).
`ms-dos' compiled as an MS-DOS application.
`windows-nt' compiled as a native W32 application.
`cygwin' compiled using the Cygwin library.
Anything else indicates some sort of Unix system.

환경이 같은경우엔 머신이름으로 구분을 하시면 되는데.. system-name 변수를 보시면 됩니다.