2011-04-26 09:46:22 +02:00
|
|
|
(add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-10:antialias=true"))
|
2011-02-21 00:27:43 +01:00
|
|
|
|
2011-05-28 00:06:37 +02:00
|
|
|
(setq-default indent-tabs-mode nil) ; spaces, no tabs
|
|
|
|
(setq inhibit-startup-message t ; don't show welcome screen
|
|
|
|
require-final-newline t ; always append a newline to a
|
|
|
|
; file, if it doesn't have one
|
|
|
|
font-lock-maximum-decoration t ; denotes my interest in maximum
|
|
|
|
; possible fontification
|
|
|
|
inhibit-default-init t ; don't load default init
|
|
|
|
scroll-conservatively 10000 ; scroll only one line
|
2011-05-28 15:25:58 +02:00
|
|
|
browse-url-browser-function 'browse-url-generic
|
|
|
|
browse-url-generic-program "conkeror"
|
2011-05-28 00:06:37 +02:00
|
|
|
whitespace-style '(face trailing)
|
|
|
|
backup-directory-alist ; backup file location
|
2011-05-23 09:43:56 +02:00
|
|
|
`((".*" .
|
2011-05-28 00:06:37 +02:00
|
|
|
,temporary-file-directory))
|
|
|
|
auto-save-file-name-transforms ; autosave file location
|
2011-05-23 09:43:56 +02:00
|
|
|
`((".*" ,temporary-file-directory
|
|
|
|
t)))
|
2011-02-21 00:27:43 +01:00
|
|
|
|
2011-05-28 00:06:37 +02:00
|
|
|
(if (not window-system)
|
|
|
|
(setq linum-format "%d ")) ; add a space if we're in text
|
|
|
|
; mode
|
|
|
|
|
2011-02-21 00:27:43 +01:00
|
|
|
(fset 'yes-or-no-p 'y-or-n-p) ; switch yes or no to y or n
|
|
|
|
|
2011-05-23 09:43:56 +02:00
|
|
|
(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
|
2011-05-27 22:57:40 +02:00
|
|
|
(global-linum-mode t) ; Show line numbers in gutter
|
2011-05-23 09:43:56 +02:00
|
|
|
(column-number-mode t) ; show column number in splitter
|
2011-02-21 00:27:43 +01:00
|
|
|
(global-font-lock-mode t) ; show syntax highlighting, old
|
|
|
|
(delete-selection-mode t) ; delete selection upon typing
|
2011-05-23 09:43:56 +02:00
|
|
|
(show-paren-mode t) ; show the opposite paren
|
|
|
|
|
|
|
|
(defun buffer-major-mode (buffer-or-string)
|
|
|
|
(with-current-buffer buffer-or-string major-mode))
|
2011-02-21 00:27:43 +01:00
|
|
|
|
|
|
|
;; Byte-compile elisp files on save
|
2011-05-23 09:43:56 +02:00
|
|
|
(add-hook 'before-save-hook
|
|
|
|
(lambda ()
|
|
|
|
(if (not (eq (buffer-major-mode (current-buffer))
|
|
|
|
'markdown-mode))
|
|
|
|
(delete-trailing-whitespace))))
|
2011-02-21 00:27:43 +01:00
|
|
|
(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))))))
|
2011-04-12 12:59:51 +02:00
|
|
|
(add-hook 'emacs-startup-hook
|
|
|
|
(lambda ()
|
|
|
|
(fullscreen)))
|