;; Initialize emacs in eshell, not splash screen ;;(setq initial-buffer-choice (eshell)) ;; Write custom set variables to different file (setq custom-file "~/.emacs.d/elisp/custom.el") ;; Set default encoding (setq current-language-environment "UTF-8") (setq require-final-newline t) ;; Always do syntax highlighting (global-font-lock-mode 1) ;; Also highlight parens (setq show-paren-delay 0 show-paren-style 'parenthesis) (show-paren-mode 1) ;; Use shift+arrows to jump between windows (windmove-default-keybindings) ;; This is the binary name of my scheme implementation (setq scheme-program-name "guile") ;; C default style (add-hook 'c-mode-hook (lambda () (c-set-style "linux"))) ;; Always use spaces, never tabs (setq-default indent-tabs-mode nil) ;; remove trailing white spaces before saving (add-hook 'before-save-hook 'delete-trailing-whitespace) ;; disable bars (tool-bar-mode -1) ;;(menu-bar-mode -1) (scroll-bar-mode -1) ;; regain more space (fringe-mode 1) ;; disable cursor blinking (setq blink-cursor-mode nil) ;; collumn numbers (column-number-mode 1) ;;fix deadkeys (require 'iso-transl) (prefer-coding-system 'utf-8) (set-default-coding-systems 'utf-8) (set-terminal-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8) (setq default-input-method "latin-1-prefix") (defun my-set-default-input-method () (set-input-method 'latin-1-prefix)) (add-hook 'text-mode-hook 'my-set-default-input-method) ;; default fill-region size (setq-default fill-column 80) ;; stop creating ~ files (setq make-backup-files nil) ; Makes *scratch* empty. (setq initial-scratch-message "") ;; Removes *scratch* from buffer after the mode has been set. (defun remove-scratch-buffer () (if (get-buffer "*scratch*") (kill-buffer "*scratch*"))) (add-hook 'after-change-major-mode-hook 'remove-scratch-buffer) ;; Removes *messages* from the buffer. ;(setq-default message-log-max nil) ;(kill-buffer "*Messages*") ;; Removes *Completions* from buffer after you've opened a file. (add-hook 'minibuffer-exit-hook #'(lambda () (let ((buffer "*Completions*")) (and (get-buffer buffer) (kill-buffer buffer))))) ;; Don't show *Buffer list* when opening multiple files at the same time. (setq inhibit-startup-buffer-menu t) ;; Show only one active window when opening multiple files at the same time. (add-hook 'window-setup-hook 'delete-other-windows) ;; No more typing the whole yes or no. Just y or n will do. (fset 'yes-or-no-p 'y-or-n-p)