XEmacs-HOWTO
XEmacs-HOWTO
ÀÌÀçÈ« http://www.pyrasis.com
¸®´ª½º, À¯´Ð½ºÀÇ X Window, MS Windows¿¡¼ »ç¿ë°¡´ÉÇÑ Emacs.
Emacs´Â ³Ê¹« À¯¸íÇϱ⠶§¹®¿¡ µû·Î ¼³Ä¡ÇÏ´Â ¹æ¹ýÀº ¼³¸íÇÏÁö ¾Ê°Ú½À´Ï´Ù. ¸®´ª½º, À¯´Ð½º, À©µµ¿ì Á¾·ù¸¦ °¡¸®Áö ¾Ê°í ¸ðµç ¿î¿µÃ¼Á¦ ¹× ¹èÆ÷ÆÇÀÇ ÆÐÅ°Áö¸¦ Á¦°øÇÏ°í ÀÖ½À´Ï´Ù.
XEmacs´Â GNU Emacsº¸´Ù ´õ ÀÚ¼¼ÇÑ GUI ÀÎÅÍÆäÀ̽º¸¦ Á¦°øÇÏ°í ÀÖ½À´Ï´Ù. Ãʺ¸ÀÚµéÀÌ ½±°Ô Á¢±ÙÇÒ ¼ö ÀÖ´Â ÀåÁ¡ÀÌ ÀÖ½À´Ï´Ù.
ÀÌ ¹®¼¸¦ º¸½Ã°í ¾Ë°í °è½Ã´Â EmacsÀÇ À¯¿ëÇÑ ¸í·É, »ç¿ë¹ý µîÀ» ÇÔ²² ¸¸µé¾úÀ¸¸é ÇÕ´Ï´Ù.
2. ÁÖÁ¦ ¶Ãʺ¸ÀÚ¸¦ ´ë»óÀ¸·Î XEmacs¸¦ ÃÖ¼ÒÇÑÀ¸·Î »ç¿ëÇÒ ¼ö ÀÖÀ» Á¤µµ·Î ¼³¸íÇÏ´Â °ÍÀÔ´Ï´Ù. °¡Àå ±âÃÊÀûÀÎ ¼Ò½º ÄÚµå ¿¡µðÆ®¸¦ À§ÁÖ·Î ÇÏ°Ú½À´Ï´Ù.
ÀÌ ¹®¼¿¡¼´Â ¸®´ª½º, À¯´Ð½º¸¦ ±âÁØÀ¸·Î ÇÏ°Ú½À´Ï´Ù.
3. ´ÜÃàÅ° »ç¿ë¹ý ¶C´Â CtrlÅ° ÀÔ´Ï´Ù.
MÀº ESC, ALTÅ° ÀÔ´Ï´Ù. µÑÁß ¾Æ¹«°ÍÀ̳ª »ç¿ëÇصµ µË´Ï´Ù.
C-c´Â CtrlÅ°¿Í cÅ°¸¦ °°ÀÌ ´©¸¥ °ÍÀÔ´Ï´Ù.
4. ±âº» ¼³Á¤ ¶»ç¿ëÀÚ È¨ µð·ºÅ丮ÀÇ
.emacs ÆÄÀÏÀÌ ¼³Á¤ ÆÄÀÏÀÔ´Ï´Ù. GNU Emacs¿Í °ø¿ëÀ¸·Î »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. XEmacs Àü¿ë ¼³Á¤ ÆÄÀÏÀº .xemacs/ µð·ºÅ丮 ¾Æ·¡¿¡ ÀÖ½À´Ï´Ù.
.emacs
;;; XEmacs backwards compatibility file
; XEmacsÀÇ ¼³Á¤ ÆÄÀÏÀ» ¿¬°áÇÕ´Ï´Ù. (setq user-init-file (expand-file-name "init.el" (expand-file-name ".xemacs" "~"))) (setq custom-file (expand-file-name "custom.el" (expand-file-name ".xemacs" "~"))) (load-file user-init-file) (load-file custom-file) ;; ¾Æ·¡ºÎÅÍ´Â °¢ÀÚ °³ÀÎ ¼³Á¤ ÀÔ´Ï´Ù. ;; ¹é¾÷ ÆÄÀÏ ¸¸µéÁö ¾Ê±â ;; (setq make-backup-files nil) ;; ÇÑ±Û ¼³Á¤ ;; (require 'cl) (when enable-multibyte-characters (set-language-environment "Korean") (setq-default file-name-coding-system 'euc-kr) ;; the following setting is unnecessary from 20.5 > (when (string-match "^3" (or (getenv "HANGUL_KEYBOARD_TYPE") "")) (setq default-korean-keyboard "3")) (setq input-method-verbose-flag nil input-method-highlight-flag nil) (prefer-coding-system 'euc-kr) (set-default-coding-systems 'euc-kr) ;;(setq default-process-coding-system '(euc-kr . euc-kr)) (if window-system (global-set-key "\C-\\" 'undefined) (global-set-key "\C-\\" 'toggle-korean-input-method )) (add-hook 'quail-inactivate-hook 'delete-quail-completions) (defun delete-quail-completions () (when (get-buffer "*Quail Completions*") (kill-buffer "*Quail Completions*"))) ;; emacs 21 or later, xim is usable (set-keyboard-coding-system 'euc-kr) (when (assq 'encoded-kbd-mode minor-mode-alist) (setf (second (assq 'encoded-kbd-mode minor-mode-alist)) "")) (unless window-system (set-terminal-coding-system 'euc-kr) (when (boundp 'encoded-kbd-mode-map) (define-key encoded-kbd-mode-map [27] nil))) ;; in case default doesn't work ;;(set-selection-coding-system 'ctext) ;; Hangul Mail setting (setq-default sendmail-coding-system 'euc-kr) ;; turn off C-h during input -- this code should be invoked after ;; loading quail but before loading specific keymap (require 'quail) (loop for kpair in '(("C-h" . quail-delete-last-char) ("C-?" . quail-delete-last-char) ("C-SPC" . set-mark-command) ("<f1>" . quail-translation-help)) do (define-key quail-translation-keymap (read-kbd-macro (car kpair)) (cdr kpair)) do (define-key quail-conversion-keymap (read-kbd-macro (car kpair)) (cdr kpair))) (define-key global-map (kbd "C-x RET s") 'decode-coding-region) ;; hangul <-> english auto conversion ;;(when window-system (require 'hangul-auto)) ) ¾Æ·¡ ÆÄÀÏÀº XEmacs Àü¿ë ¼³Á¤ÀÔ´Ï´Ù.
.xemacs/init.el
(setq inhibit-default-init t) ;
;; ¾Æ·¡ºÎÅÍ´Â °¢ÀÚ °³ÀÎ ¼³Á¤ ÀÔ´Ï´Ù. ;; ¸¶¿ì½º ÈÙ ¼³Á¤ ;; (global-set-key [mouse-4] 'scroll-down) (global-set-key [mouse-5] 'scroll-up) ;; Ç×»ó ¹®¹ý °Á¶ ;; (font-lock-mode 'font) ;; ¹è°æ»ö ¼³Á¤, ¹è°æ»öÀº °ËÁ¤, ±ÛÀÚ»öÀº ȸ»öÀ¸·Î ¼³Á¤ ;; (set-face-foreground 'default "gray80") (set-face-background 'default "black") ;; Syntax highlighting »ö ¼³Á¤ÀÔ´Ï´Ù. ¸¶À½¿¡ µå´Â »ö±òÀ» ¼³Á¤ÇÕ´Ï´Ù. ;; ;; ÀÌ ¼³Á¤ÀÌ ¾øÀ¸¸é XEmacsÀÇ ±âº» »ö ¼³Á¤À» µû¸¨´Ï´Ù. ;; ; Syntax highlighting. Dark background. ; Insert this in .emacs. Then restart XEmacs. (custom-set-faces '(default ((t (:foreground "gray80" :background "black" :size "15" :family "Fixed"))) t) '(cperl-array-face ((t (:foreground "orangered" t)))) '(cperl-hash-face ((t (:foreground "Red" t)))) '(cperl-nonoverridable-face ((t (:foreground "orange" t)))) '(custom-button-face ((t (t :foreground "#3fdfcf")))) '(custom-group-tag-face ((t (:underline t :foreground "blue")))) '(custom-saved-face ((t (:underline t :foreground "orange")))) '(custom-state-face ((t (:foreground "green3")))) '(custom-variable-button-face ((t (t :underline t :foreground "white")))) '(dired-face-permissions ((t (:foreground "green")))) '(font-lock-comment-face ((t (:foreground "#52ffff")))) '(font-lock-doc-string-face ((t (:foreground "Wheat3")))) '(font-lock-function-name-face ((t (:foreground "gray80" t)))) '(font-lock-keyword-face ((t (:foreground "green")))) '(font-lock-preprocessor-face ((t (:foreground "#5255ff" t)))) '(font-lock-reference-face ((t (:foreground "orangered")))) '(font-lock-string-face ((t (:foreground "#ff55ff")))) '(font-lock-type-face ((t (:foreground "green" t)))) '(font-lock-variable-name-face ((t (:foreground "gray80" t)))) '(font-lock-warning-face ((t (:foreground "Violetred" t)))) '(highlight ((t (:foreground "red3" :background "white"))) t) '(isearch ((t (:foreground "red" :background "white"))) t) '(list-mode-item-selected ((t (:foreground "green"))) t) '(message-cited-text ((t (t :italic nil)))) '(secondary-selection ((t (:foreground "white" :background "red"))) t) '(text-cursor ((t (:foreground "black" :background "green"))) t) '(zmacs-region ((t (:background "RoyalBlue"))) t) ) X¿¡¼ »ç¿ëÇÏ´Â ÆùÆ®¸¦ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÚ½ÅÀÌ °¡Áø ÆùÆ®¸¦ ¾Ë¸Â°Ô ÁöÁ¤ÇÏ¸é µË´Ï´Ù.
.xemacs/custom.el
;; ¿µ¹® ÆùÆ® ÁöÁ¤ ;;
(set-face-font 'default '("-misc-fixed-medium-r-*-*-15-*-*-*-*-*-iso8859-*") 'prepend) ;; ÇÑ±Û ÆùÆ® ÁöÁ¤ ;; (set-face-font 'default '("-hanyang-gulim-medium-r-normal--14-*-*-*-*-*-ksc5601.1987-*") 'global '(mule-fonts) 'prepend) 6. ÇÑ±Û ÀÔ·Â ¶nabi, imhangul, amiµîÀÇ ÇÑ±Û ÀԷ±â·Î ÇÑ±Û ÀÔ·ÂÀÌ °¡´ÉÇÕ´Ï´Ù.
EmacsÀÇ ´Ù±¹¾î ÀÔ·Â ¸ðµâ Mule¸¦ »ç¿ëÇÏ·Á¸é C-\·Î ÇÑ¿µ º¯È¯À» ÇÕ´Ï´Ù. ÇÑ±Û ÀԷ±âÂÊ º¸´Ù Mule·Î ÀÔ·ÂÇÏ´Â °ÍÀÌ Á»´õ ºÎµå·´½À´Ï´Ù.
6.1. etags¸¦ »ç¿ëÇÑ ¼Ò½º ºÐ¼® ¶Vim + ctags ó·³ Emacs¿¡¼µµ etags¸¦ »ç¿ëÇؼ ¼Ò½º¸¦ ºÐ¼®ÇÒ ¼ö ÀÖ½À´Ï´Ù.
TAGS ÆÄÀÏ ¸¸µé±â
hello-src# find . -name "*.[chCH]" -print | etags -
ºÐ¼®ÇÒ ¼Ò½º¸¦ ¿°í ã°íÀÚ ÇÏ´Â ÇÔ¼ö¿¡¼ M-. ÀüÀÇ ÆÄÀÏ·Î µÇµ¹¾Æ °¡·Á¸é M-*
´Ù¸¥ µð·ºÅ丮¿¡¼ M-.À» ÀÔ·ÂÇϸé XEmacs°¡ TAGS ÆÄÀÏÀÇ À§Ä¡¸¦ ¹°¾î¿Ã °ÍÀÔ´Ï´Ù. À§Ä¡¸¦ ÁöÁ¤ÇØ ÁÝ´Ï´Ù.
|
Words are the voice of the heart. |