"Dot emacs"의 두 판 사이의 차이
ph
(새 문서: <source lang='lisp'> (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be carefu...) |
|||
29번째 줄: | 29번째 줄: | ||
(global-set-key (kbd "<f3>") 'buffer-menu) | (global-set-key (kbd "<f3>") 'buffer-menu) | ||
− | (global-set-key (kbd "<f2>") ' | + | (global-set-key (kbd "<f2>") 'switch-to-buffer) |
;;(global-set-key (kbd "M-") 'list-buffers) | ;;(global-set-key (kbd "M-") 'list-buffers) |
2011년 5월 6일 (금) 00:25 판
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(tool-bar-mode nil))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
;; (setq inhibit-default-init t)
;; turn on font-lock mode
(when (fboundp 'global-font-lock-mode)
(global-font-lock-mode t))
;; enable visual feedback on selections
(setq transient-mark-mode t)
(setq column-number-mode t)
;; default to better frame titles
(setq frame-title-format
(concat "%b - emacs@" system-name))
(global-set-key (kbd "<f3>") 'buffer-menu)
(global-set-key (kbd "<f2>") 'switch-to-buffer)
;;(global-set-key (kbd "M-") 'list-buffers)
(global-set-key (kbd "M-s") 'save-buffer)
(global-set-key (kbd "M-p") 'scroll-down)
(global-set-key (kbd "M-n") 'scroll-up)
(global-set-key (kbd "<select>") 'move-end-of-line) ; weird
(global-set-key (kbd "C-x SPC") 'set-mark-command) ; for mac
(global-set-key (kbd "ESC <deletechar>") 'kill-word)
(menu-bar-mode -1)
(add-to-list 'load-path "/Users/ph/.elisp")
(load "php-mode")
(add-to-list 'auto-mode-alist '("\\.nhn\\'" . php-mode))
(add-to-list 'auto-mode-alist '("\\.tpl\\'" . sgml-mode))
(setq make-backup-files nil)
(autoload 'js2-mode "js2" nil t)
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
;;(add-to-list 'auto-mode-alist '("\\.nhn$" . js2-mode))
;;(add-to-list 'auto-mode-alist '("\\.tpl$" . js2-mode))
(set-variable 'scroll-step 1)
;;(setq indent-tabs-mode nil)
(setq-default tab-width 4)
;;(setq c-basic-offset 4)
(add-hook 'c++-mode-hook '(lambda ()
(local-set-key (kbd "RET") 'newline-and-indent)))
(setq c-default-style "stroustrup")
(require 'linum)
;; http://www.emacswiki.org/emacs/ModeCompile
;; Helper for compilation. Close the compilation window if
;; there was no error at all.
(defun compilation-exit-autoclose (status code msg)
;; If M-x compile exists with a 0
(when (and (eq status 'exit) (zerop code))
;; then bury the *compilation* buffer, so that C-x b doesn't go there
(bury-buffer)
;; and delete the *compilation* window
(delete-window (get-buffer-window (get-buffer "*compilation*"))))
;; Always return the anticipated result of compilation-exit-message-function
(cons msg code))
;; Specify my function (maybe I should have done a lambda function)
(setq compilation-exit-message-function 'compilation-exit-autoclose)