diff options
author | Luo Jinghua <sunmoon1997@gmail.com> | 2010-01-03 21:43:56 +0800 |
---|---|---|
committer | Luo Jinghua <sunmoon1997@gmail.com> | 2010-01-03 21:43:56 +0800 |
commit | 378fb7d79ee418b01f36e5b2b76ec49597105872 (patch) | |
tree | d2fc6829e1c3fe6753b549cdf02326e30f9b2faf | |
parent | 39d289c40eb270a2821a7e0b435ece2fd2b16806 (diff) |
emacs: only set color theme & font if emacs is windowed
-rw-r--r-- | emacs | 21 |
1 files changed, 17 insertions, 4 deletions
@@ -1,12 +1,12 @@ -(add-hook 'window-setup-hook - (lambda nil +(if window-system + (progn ;; font setting (set-default-font "Bitstream Vera Sans Mono-9") (set-fontset-font (frame-parameter nil 'font) 'chinese-gbk '("Microsfot Yahei" . "unicode-bmp")) ;; window positioning - (setq default-frame-alist '((top . 0) (left . 0) (width . 200) (height . 80))))) + (setq default-frame-alist '((top . 0) (left . 0) (width . 160) (height . 40))))) (setq inhibit-startup-message t) (setq ecb-auto-activate t) @@ -15,16 +15,21 @@ (load "/usr/share/emacs/site-lisp/site-gentoo") ;;(setq-default make-backup-files nil) +;; load ecb (require 'ecb) +;; set color theme if emacs is windowed (require 'color-theme) (color-theme-initialize) -(color-theme-bharadwaj-slate) +(if window-system + (progn + (color-theme-bharadwaj-slate))) ;;color terminal (require 'ansi-color) (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) +;; ask for y or n instead (fset 'yes-or-no-p 'y-or-n-p) (transient-mark-mode t) @@ -183,6 +188,14 @@ (require 'doxymacs) (add-hook 'c-mode-common-hook 'doxymacs-mode) + +;; Set the fill column to 70 for human text, and 80 for code. +;;(add-hook 'text-mode-hook '(lambda () (set-fill-column 70))) +;;(add-hook 'c-mode-hook '(lambda () (set-fill-column 80))) +;;(add-hook 'c++-mode-hook '(lambda () (set-fill-column 80))) +;;(add-hook 'python-mode-hook '(lambda () (set-fill-column 80))) +;;(add-hook 'java-mode-hook '(lambda () (set-fill-column 80))) + ;;auto-complete (require 'auto-complete) (require 'auto-complete-config) |