(message "* --[ Loading my Emacs init file ]--")

(defun c-mode-common-hook ()
  (c-toggle-electric-state -1)
  (c-set-style "k&r")
  )
;;(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)


;; disable C-z kill
(global-set-key "\C-Z" nil)

;; set colors
(set-background-color "black")
(set-foreground-color "white")

;; set indent
(setq-default standard-indent 3)
(setq-default indent-tabs-mode nil)
(setq-default tab-width 3)
(setq tab-width 3)

;; line highlighting
(defvar running-xemacs (string-match "XEmacs" emacs-version))
(if (not running-xemacs)
    (pc-selection-mode 1))

;; set backtab
;;(global-set-key [backtab] 'hippie-expand)

;; no line wrap
(set-default 'truncate-lines t)

;; add block comment capability
(global-set-key (kbd "C-;") 'comment-region)
(global-set-key (kbd "C-'") 'uncomment-region)

;; show file path
(setq frame-title-format
      (list (format "%s %%S: %%j " (system-name))
        '(buffer-file-name "%f" (dired-directory dired-directory "%b"))))

;; make Completions buffer disappear for good
(add-hook 'minibuffer-exit-hook 
      '(lambda ()
         (let ((buffer "*Completions*"))
           (and (get-buffer buffer)
            (kill-buffer buffer)))))


