legacy-dotfiles/emacs.d/10-settings.el

48 lines
1.8 KiB
EmacsLisp
Raw Normal View History

(if (eq system-type 'gnu/linux) ; if we're running linux
(set-frame-font "-*-tamsyn-medium-*-*-*-15-*-*-*-*-80-*-*"))
(setq inhibit-startup-message t) ; don't show welcome screen
2011-03-23 22:40:47 +01:00
(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
2011-03-23 22:40:47 +01:00
(setq-default indent-tabs-mode nil) ; spaces, no tabs
2011-03-23 22:40:47 +01:00
(setq backup-directory-alist `((".*" . ,temporary-file-directory)))
; backup file location
(setq auto-save-file-name-transforms `((".*" ,temporary-file-directory t)))
; autosave file location
(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
2011-04-01 17:45:34 +02:00
(scroll-bar-mode -1) ; no scrollbars
(line-number-mode -1) ; don't show line number in splitter
(global-linum-mode t) ; show them in the gutter
(column-number-mode t) ; show column number in splitter
(global-font-lock-mode t) ; show syntax highlighting, old
(show-paren-mode t) ; show matching parens
(delete-selection-mode t) ; delete selection upon typing
2011-03-17 11:36:56 +01:00
(autopair-global-mode)
;; Byte-compile elisp files on save
(add-hook 'before-save-hook '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))))))