From 62f897fdf5988840ee5538e30fbd3c7bcb715735 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Mon, 21 Feb 2011 00:27:43 +0100 Subject: New .emacs style * .emacs only loops through .emacs.d and runs the *.el files there. * files are automatically compiled before loading. But only if it hasn't already been compiled. * all emacs el files, save for the startup scripts, have been moved to .emacs.d/elisp --- emacs.d/10-settings.el | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 emacs.d/10-settings.el (limited to 'emacs.d/10-settings.el') diff --git a/emacs.d/10-settings.el b/emacs.d/10-settings.el new file mode 100644 index 0000000..1877c58 --- /dev/null +++ b/emacs.d/10-settings.el @@ -0,0 +1,42 @@ +(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 +(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 indent-tabs-mode nil) ; spaces, no tabs + +(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 +(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 + +;; Byte-compile elisp files on save +(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)))))) + + + + + + + + + + -- cgit v1.2.3-54-g00ecf