>> Read No. 2153 article  
MS 윈도 2000에서 Emacs 21.1 쓰기

등록 2002-01-28 14:02:00     조회 5
이름 송덕균    

		이맥스21 MS 윈도 2000에서 쓰기
===========================
 작성자: 唯天 송덕균
작성일: 2002년 1월 26일
    1. 준비
--------
 Emacs의 홈페이지에 들어가서 한번 훑어 본다.
 --> http://www.gnu.org/software/emacs/  한글 Emacs 사용자 홈페이지는
 --> http://emacs.kldp.org    2. Emacs 21 받기
-----------------
 다음 사이트에서 받을 수 있다.
   ftp://ftp.gnu.org/windows/emacs/21.1   ftp://ftp.nuri.net/pub/mirrors/ftp.gnu.org/windows/emacs/21.1  최신 안정
 버전은 21.1 이다. 속편하게 다음 화일만 받아오자.    emacs-21.1-fullbin-i386.tar.gz
  또는 Hpack Project의 일환으로 만들어진 Emacs for Windows 패키지가
있다. 다음 사이트에서 받을 수 있다.
   http://physics.kyunghee.ac.kr/~reds/Hpack_Project/default.htm  인스톨쉴드로 만들어져 아주 쉽게 설치
할 수 있다. 이것만 설치하면 밑의 내용은 볼필요 없다. emoticon;
    3. Emacs 21 설치
-----------------
 emacs-21.1-fullbin-i386.tar.gz을 받았을 경우 다음과 같이 하자.
 자신이 원하는 곳 아무데나 압축을 풀자. 필자는 윈도식으로
"C:/Program Files/" 밑에 압축을 풀었다. 그러면 emacs-21.1/bin 에
runemacs.exe 화일이 있을 것이다. 한번 실행 해보자.
 !!!! 이게 왠일 한글이 90도 돌려져서 나오네~ !!!!
!!!! 한글 입력도 안되고...                !!!!
 따라서 다음의 내용을 마우스로 짤라 붙여서 _emacs 화일을 만들고,
c:/에 복사한다. (emacs21 은 c:/에서 설정화일을 읽어오는 것 같다.
아니라면 C-x C-f ~/를 눌러서 어느 디렉터리로 이동하는가 보고, 그
디렉터리에 _emacs 화일을 복사한다.)
.emacs 화일은 윈도2000에서는 생성이 안될것이다. 화일 이름이 없다고!
 참고로, 아래 화일은 인터넷을 떠돌다 여기저기서 긁어 모은 것입니다.
(설정 화일을 만들어주신 분들께 감사드립니다.)
 <pre>
 ------------------------ CUT --------------------------
  ;; beginning of _emacs
;; author W. Minten et al.
;; last modification September 15, 1997
 ;; Modified by Suk-Ho Hong
;; This is a part of HPack Project
 ;; default frame and color settings
; invoke   M-x list-colors-display    to choose the colors
; comment this if you want to see the default settings
;(setq default-frame-alist      '((top . 000) (left . 000)
;    (width . 80) (height . 44)	(cursor-color . "red")
;    (vertical-scroll-bars . right)
	;fonts found on the mailing list, uncomment one at your convenience
;	(font . "-*-Courier-normal-r-*-*-13-97-*-*-c-*-*-ansi-")
;	(font . "-*-Terminal-normal-r-*-*-8-60-*-*-c-*-*-oem-")
;	(font . "-*-Terminal-normal-r-*-*-12-72-*-*-c-80-*-oem-")
;	(font . "-*-Terminal-normal-r-*-*-8-60-*-*-c-*-*-oem-")
;	(font . "-*-Terminal-normal-r-*-*-19-142-*-*-c-*-*-oem-")
;    )
;    )
;; some interactive color settings by means of
; M-x set-mouse-color  RET magenta RET  ;strange but this seems not to work..
; M-x set-cursor-color RET red RET
; M-x set-background-color RET black RET
; M-x set-foreground-color RET yelow RET
 ;some useful additional settings
(setq display-time-24hr-format t)			; In 24 hour format
(display-time) 						; Display the time
(setq-default auto-fill-hook 'do-auto-fill)
(setq fill-column 98)
;(standard-display-european 1)	           ; Display full ISO character set
(put 'eval-expression 'disabled nil)
(setq text-mode-hook '(lambda() (auto-fill-mode 1)))
 ;; no emacs start-up message
(setq inhibit-startup-message t)
 ;; Redefine some keys.
(setq kill-whole-line t)                                ; Kill EOL too
(global-set-key [kp-home] 'beginning-of-line)
(global-set-key [kp-end] 'end-of-line)
(global-set-key [home] 'beginning-of-line)
(global-set-key [end] 'end-of-line)
(global-set-key [C-home] 'beginning-of-buffer)
(global-set-key [C-end] 'end-of-buffer)
(global-set-key [S-delete] 'clipboard-kill-region)
(global-set-key [S-insert] 'clipboard-yank)
(global-set-key [C-insert] 'clipboard-kill-ring-save)
(global-set-key [S-right] 'set-mark-command)
(global-set-key [f1]      'goto-line)           ; goto line
(global-set-key [delete]  'delete-char)         ; delete character under cursor
(global-set-key [f4]      'indent-three-spaces) ; indent 3 spaces
(global-set-key [f8]      'kill-current-line)   ; delete current line
(global-set-key [f7]      'kill-current-or-next-word)   ; delete current word
(global-set-key [?C-z] 'undo); added here because I usually do kills by mistake
(global-set-key "C-xC-j" 'goto-line) ; Command prompts for linenumber to go to.
;; Define function that indents three spaces.
(defun indent-three-spaces ()
   "Indent three spaces."
   (interactive)
   (beginning-of-line)
   (insert "   ")
   (next-line 1)
)
;; Define function that removes the current line.
(setq kill-whole-line t)
(defun kill-current-line ()
   "Delete the current line."
   (interactive)
   (beginning-of-line)
   (kill-line)
)
;; Define function that removes the current word.
(defun kill-current-or-next-word ()
   "Delete current or next word."
   (interactive)
   (forward-word 1)
   (backward-kill-word 1)
   ;(delete-char 1)
)
  ;;; =============================================================
;;; Korean Language Environment
;;; =============================================================
 ;; General korean langauge environment
(set-language-environment "Korean") 
 ;(set-default-coding-systems 'euc-kr)
(set-selection-coding-system
 (cond ((eq system-type 'windows-nt) 'euc-kr-dos)
       (t 'euc-kr)))
 ; System input method setting
(set-keyboard-coding-system 'euc-kr)
 ;; For use of `emacs -nw' in Korean terminal
(if (null window-system)
    (progn
      (set-terminal-coding-system 'euc-kr)
      ;; To avoid conflict with key bindings starting with ESC.
      ;; Problem can still occur if your terminal input method use
      ;; `ESC' prefix.
      (define-key encoded-kbd-mode-map [27] nil)))
 ;;; =============================================================
;;; Fonts and Frame for Windows 95/NT
;;; For multilingual display, get fonts from
;;; http://www.microsoft.com, ;;; http://babel.uoregon.edu/yamada/guides.html ;;; ======================================
=======================  ; To see list of fonts in your Windows 95/NT,
; (w32-select-font) or
; (insert (prin1-to-string (x-list-fonts "*")))
 ;; alternative fonts:
; Gulimche:
;  korean-ksc5601:-*-261274270262303274-normal-r-*-*-16-*-*-*-c-*-ksc5601-*,
; Batangche:
;  korean-ksc5601:-*-271331305301303274-normal-r-*-*-16-*-*-*-c-*-ksc5601-*,
; Dodumche:
;  korean-ksc5601:-*-265270277362303274-normal-r-*-*-16-*-*-*-c-*-ksc5601-*,
; Gungseoche:
;  korean-ksc5601:-*-261303274255303274-normal-r-*-*-16-*-*-*-c-*-ksc5601-*,
;  chinese-gb2312:-*-MS Song-normal-r-*-*-*-*-*-*-c-*-gb2312-*,
 (if (eq window-system 'w32)
    (progn
       (create-fontset-from-fontset-spec
	"-*-Courier New-normal-r-*-*-12-*-*-*-c-*-fontset-mscourier12,
	latin-iso8859-1:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-1,
	latin-iso8859-2:-*-Courier New CE-normal-r-*-*-*-*-*-*-c-*-iso8859-2,
	latin-iso8859-3:-*-Courier New Tur-normal-r-*-*-*-*-*-*-c-*-iso8859-3,
	latin-iso8859-4:-*-Courier New Baltic-normal-r-*-*-*-*-*-*-c-*-iso8859-4,
	cyrillic-iso8859-5:-*-Courier New Cyr-normal-r-*-*-*-*-*-*-c-*-iso8859-5,
	greek-iso8859-7:-*-Courier New Greek-normal-r-*-*-*-*-*-*-c-*-iso8859-7,
        korean-ksc5601:-*-265270277362303274-normal-r-*-*-12-*-*-*-c-*-ksc5601.1987-*,
	japanese-jisx0208:-*-MS Gothic-normal-r-*-*-12-*-*-*-c-*-jisx0212-sjis,
	japanese-jisx0212:-*-MS Gothic-normal-r-*-*-12-*-*-*-c-*-jisx0212-sjis,
	katakana-jisx0201:-*-MS Gothic-normal-r-*-*-12-*-*-*-c-*-jisx0212-sjis,
	chinese-gb2312:-*-MS Hei-normal-r-*-*-*-*-*-*-c-*-gb2312-*,
	chinese-big5-1:-*-MingLiU-normal-r-*-*-*-*-*-*-c-*-big5-1,
	chinese-big5-2:-*-MingLiU-normal-r-*-*-*-*-*-*-c-*-big5-2"
	t)
        (setq w32-enable-italics t)
       ;; for better font dialog menu for fontset
       (setq w32-use-w32-font-dialog nil)
       ;(setq w32-enable-unicode-output nil)
        (setq initial-frame-alist '((top . 40) (left . 40)))
       (setq default-frame-alist
	     (append '(
		       ;; Choose only one for your default font set.
                       ;(font . "-*-Courier New-normal-r-*-*-13-*-*-*-c-*-fontset-standard")
                       ;(font . "-*-Terminal-normal-r-*-*-12-72-*-*-c-80-fontset-msterminal12")
		       (font . "-*-Courier New-normal-r-*-*-12-*-*-*-c-*-fontset-mscourier12")
		       ;(font . "-*-Fixedsys-normal-r-*-*-12-*-*-*-c-*-fontset-standard")
		       (width . 110)
		       (height . 46)
		       (background-color . "gray85")
		       (foreground-color . "Black")
		       (cursor-color . "Blue")
		       (vertical-scroll-bars . right))
		     default-frame-alist))))
 ;;; =============================================================
;;; Input Method
;;; =============================================================
 ;; C-SPC or C- for toggling input method.
;; F9 for switching with hanja input, C-F9 for switching with symbol input
;;    in Korean input method.
;; C-U C-SPC or C-U C- for other input method.
 ;; For Multilingual Input Method Package installed on Windows 95/NT
(if (eq system-type 'windows-nt)
    (progn
      (setq load-path (append load-path (list (concat data-directory "~/leim"))))
      (load "leim-list.el" t)))
 ;; If your default keyboard type is 3 bulsik, uncomment following line.
;(setq default-korean-keyboard "3" default-input-method "korean-hangul3")
  ;; Redefinition from `toggle-korean-input-method ' to `toggle-input-method'
(global-set-key [?S- ] 'toggle-input-method)
 ;; Selection of major korean input method determines Korean keyboard type.
;; Verbose mode of hangul input method is needless for most Korean users.
(add-hook
 'input-method-activate-hook
 (function (lambda ()
             (cond ((string= current-input-method "korean-hangul3")
                    (setq default-korean-keyboard "3"
                          input-method-verbose-flag nil
                          input-method-highlight-flag nil))
                   ((string= current-input-method "korean-hangul")
                    (setq default-korean-keyboard ""
                          input-method-verbose-flag nil
                          input-method-highlight-flag nil))))))
(add-hook
 'input-method-inactivate-hook
 (function (lambda ()
             (if (or (string= current-input-method "korean-hangul")
                     (string= current-input-method "korean-hangul3"))
                 (setq input-method-verbose-flag 'default
                       input-method-highlight-flag t)))))
   ;;;;Define keys and functions useful for AUC-TeX
;;If you do not want to use 'C-c C-c' or the pull-down menu "Command"
 (global-set-key [(control f1)] 'do-LaTeX)      ; LaTeX  the current file
(global-set-key [(control f2)] 'do-DVIview)    ; DVIview  the current file
(global-set-key [(control f3)] 'do-DVIPS-normal)      ; DVIPS  the current file
(global-set-key [(control f4)] 'do-PSview)     ; PSview  the current file
(global-set-key [(control f5)] 'do-dvipdfm)   ; DVIPDFM the current file
(global-set-key [(control f6)] 'do-BibTeX)    ; BibTeX the current file
(global-set-key [(control f7)] 'do-index)     ; Index the current file
(global-set-key [(control f8)] 'do-check)     ; Check the current file
(global-set-key [(control f9)] 'do-DVIPS-landscape)      ; DVIPS the current file using landscape option
(global-set-key [(control f10)] 'do-ACROBAT)      ; READ the current file using ACROBAT READER
 (defun do-LaTeX ()
   "LaTeX the curent file."
   (interactive)
   (TeX-command "LaTeX" 'TeX-master-file))
 (defun do-DVIview ()
   "YAPview the curent file."
   (interactive)
   (TeX-command "View" 'TeX-master-file))
 (defun do-DVIPS-normal ()
   "DVIPS the curent file."
   (interactive)
   (TeX-command "dviPS" 'TeX-master-file))
 (defun do-PSview ()
   "DVIPS the curent file."
   (interactive)
   (TeX-command "Ghostview" 'TeX-master-file))
 (defun do-dvipdfm ()
   "DVIPDFM the curent file."
   (interactive)
   (TeX-command "dvipdfm" 'TeX-master-file))
 (defun do-BibTeX ()
   "BibTeX the curent file."
   (interactive)
   (TeX-command "BibTeX" 'TeX-master-file))
 (defun do-index ()
   "Index the curent file."
   (interactive)
   (TeX-command "index" 'TeX-master-file))
 (defun do-check ()
   "Check the curent file."
   (interactive)
   (TeX-command "check" 'TeX-master-file))
 (defun do-DVIPS-landscape ()
   "DVIPS the curent file using landscape option."
   (interactive)
   (TeX-command "dviPS-landscape" 'TeX-master-file))
 (defun do-ACROBAT ()
   "READ the current file using ACROBAT READER."
   (interactive)
   (TeX-command "acrobat" 'TeX-master-file))
 ;; prevent echoing ^M in the shell
(add-hook 'comint-output-filter-functions 'shell-strip-ctrl-m nil t)
 ;; if you have a network connection with UNIX like environment
; take care of CR/LF disabling if NTemacs manages (load/save) files on it
; ftp://ftp.sunet.se/pub/os/Win32/ntEmacs/docs/ntemacs.html#translation (load "~/site-lisp/untranslate")
;(add-untranslated-filesystem "d:")    ; d: is a UNIX drive
;if you encounter a file with ^M or ... at the end of every line,
; this means a worng copy by samba or floppy disk of the DOS file to UNIX.
; get rid of them by pressing [F5]
(global-set-key [f5]      'cut-ctrlM) ; cut all ^M.
(defun cut-ctrlM () 
   "Cut all visible ^M."
   (interactive)
   (beginning-of-buffer)
   (while (search-forward "
" nil t)
    (replace-match "" nil t))
)
 ;; use ISPELL on PC (see http://cat.rpi.edu/~tibbetts/ispell_toc.html ;  fot the installation procedure)
; you don't need to add     c:ispell4exe      to your PATH, and
; you don't need to copy or move any file after unzipping
; if you define ispell-command and ispell-look-command properly.
; M-$ for ispell word under cursor,  M-x ispell-buffer for whole buffer
; see also pull-down menu <Edit>, <Spell>, <Check ...>.
(cond ((file-exists-p "~/ispell4/exe/ispell.exe")
       (autoload 'ispell-word "ispell4"
         "Check spelling of word at or before point" t)
       (autoload 'ispell-complete-word "ispell4"
         "Complete word at or before point" t)
       (autoload 'ispell-region "ispell4"
         "Check spelling of every word in the region" t)
       (autoload 'ispell-buffer "ispell4"
         "Check spelling of every word in the buffer" t)
       (setq ispell-command "~/ispell4/exe/ispell.exe"
        ispell-look-dictionary "~/ispell4/ispell.words"
        ispell-look-command "~/ispell4/exe/look.exe"
        ispell-command-options (list "-d" "C:/PROGRA~1/Emacs-21.1/ispell4/ISPELL~1.DIC"))))
;still necessary
;;(setenv "TEMP" "c:/windows/temp")
;;(setenv "TMP" "c:/windows/temp")
 ; helpful
(setq text-mode-hook '(lambda ()
     (local-set-key "M-	" 'ispell-complete-word)))
(setq tex-mode-hook '(lambda ()
     (local-set-key "M-	" 'ispell-complete-word)))
(setq latex-mode-hook '(lambda ()
     (local-set-key "M-	" 'ispell-complete-word)))
; enable tex parser, also very helpful
(setq ispell-enable-tex-parser t)
 ;; fontification font-lock.el much better than the default hilit19.el
;***************************** (for coloring)
;;automatic Font Lock mode in TeX mode
;(add-hook 'tex-mode-hook 'turn-on-font-lock)
;;if Font Lock necessary for other than .tex files, uncomment following
(global-font-lock-mode t)
(setq font-lock-maximum-decoration t)
  ;; stig-paren.el, a parentheses mathing much better than the default paren.el
;*************** (for better view of matched parentheses)
(cond (window-system
  (require 'stig-paren)
 ;; XEmacs
  (global-set-key [(control leftparen)] 'stig-paren-toggle-dingaling-mode)
  (global-set-key [(control rightparen)] 'stig-paren-toggle-sexp-mode))
  (t
  (setq blink-matching-paren t)))
 ;;settings for bib-cite.el
;**************************
(require 'imenu)
(define-key global-map [S-mouse-3] 'imenu)
(autoload 'turn-on-bib-cite "bib-cite")
(add-hook 'LaTeX-mode-hook 'turn-on-bib-cite)
 
 ;; load default lisp file (.el or .elc) for improved LaTeX mode
;; all settings are located in tex-site, hence
;**************************************************************
(load "~/site-lisp/tex-site")
 
(custom-set-variables
 '(transient-mark-mode t)
 '(make-backup-files t))
(custom-set-faces)
 ;;end of _emacs
 -------------------------- END ----------------------------
</pre>
이름
암호
  목록보기 윗글 아랫글
글쓰기
답장쓰기 수정 삭제
정규표현식 [ 상세 검색 ]
페이지로딩: [ 0.99 초 ] 작업시간: [ 0.01 초 ]

Copyleft 1999-2026 by JSBoard Open Project
Theme Designed by IDOO All right reserved
[TOP]

적수네 동네
+
| 적수네 동네
| 공부방
| 리눅스 잡지 서고
| LSN 소스
| 링크 모음
+---+
게시판
+
| 떠들어보세!
| 질문과 답변
| 새소식과 정보
| 1원짜리 팁?
| 대화방
+---+
칼럼?
+
| 세하 훔쳐보기
| Welcome2nite
| 혜진의 염장판
+---+
리눅스 상표권
+
| 반대 서명란
| 토론 게시판
+---+
GNU
+
| GNU 선언문
| GNU GPL
| GNU 미러 목록
+---+
프로젝트?
+
| 리눅스카운터
| RC5DES
| 실질헌법 제작
+---+
커널 소식
+
| 안정 버젼: 2.4.14
+---+
테마 선택
+
LSN 방송국?
+
| OFF AIR
+---+
회원
+
| 로그인
+---+
[ 적수네 동네 ] [ 리눅스 상표권 독점 반대 ] [ 한글 리눅스 문서 프로젝트 ] [ KrLine ] [ 사랑넷 ] [ Valid HTML 4.0! ] [ SlashDot ] [ Freshmeat ]
Copyleft (C) 1998-2001 Byeong-Chan Kim . License
TIME: 1791051770
System by WYZsoft, HDD by I.O.Linux, Mizi Research, Embryo, WOWLINUX, Domain by SarangNet, Network by KrLine.