legacy-dotfiles/emacs.d/10-settings.el
Tom Willemsen 136128abd1 Removed c-eldoc and linum-ex
I didn't use c-eldoc and linum-ex only seemed to cause warnings to
show up when loading files, not improve any speed.
2011-05-27 22:57:40 +02:00

50 lines
2.1 KiB
EmacsLisp

(add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-10:antialias=true"))
(setq inhibit-startup-message t) ; don't show welcome screen
(setq require-final-newline t) ; always append a newline to a
; file, if it doesn't have one
(setq font-lock-maximum-decoration t) ; denotes my interest in maximum
; possible fontification
(setq inhibit-default-init t) ; don't load default init
(setq-default indent-tabs-mode nil) ; spaces, no tabs
(setq scroll-conservatively 10000) ; scroll only one line
(setq whitespace-style '(face trailing))
(setq backup-directory-alist ; backup file location
`((".*" .
,temporary-file-directory)))
(setq auto-save-file-name-transforms ; autosave file location
`((".*" ,temporary-file-directory
t)))
(fset 'yes-or-no-p 'y-or-n-p) ; switch yes or no to y or n
(tool-bar-mode -1) ; no toolbar
(menu-bar-mode -1) ; no menubar
(scroll-bar-mode -1) ; no scrollbars
(line-number-mode -1) ; don't show line number in
; splitter
(global-linum-mode t) ; Show line numbers in gutter
(column-number-mode t) ; show column number in splitter
(global-font-lock-mode t) ; show syntax highlighting, old
(delete-selection-mode t) ; delete selection upon typing
(show-paren-mode t) ; show the opposite paren
(defun buffer-major-mode (buffer-or-string)
(with-current-buffer buffer-or-string major-mode))
;; Byte-compile elisp files on save
(add-hook 'before-save-hook
(lambda ()
(if (not (eq (buffer-major-mode (current-buffer))
'markdown-mode))
(delete-trailing-whitespace))))
(add-hook 'after-save-hook
(lambda ()
(let ((fname (buffer-file-name)))
(let ((suffix (file-name-extension fname)))
(if (string-equal suffix "el")
(byte-compile-file fname))))))
(add-hook 'emacs-startup-hook
(lambda ()
(fullscreen)))