(setq-default scroll-step 1) ;;scroll by one line (set-face-font 'default '"-adobe-times-medium-r-normal-*-*-140-*-*-p-*-iso10646-1") ;; Backup files (setq make-backup-files nil) ; don't make backup files (setq version-control 'never) ; don't use version numbers for backup files (setq backup-by-copying-when-linked t) ; do not destroy hardlinks (setq bkup-backup-directory-info '((t "~/.backups/" ok-create full-path))) (require 'boxquote) ;; Boxes (require 'thinks) ;; .oO()Oo. (require 'message) ;; addons like rot13 (message-caesar-) ;; If you use your .emacs for different machines you may want to allow require to soft fail: ;; (require 'boxquote nil t) (mwheel-install) ;; Scrollrad (add-hook 'text-mode-hook '(lambda () (flyspell-mode))) ;; Turn on Flyspell mode automatically in some modes and related modes. ;; ;; File associations ;; ;; Make Text mode the default mode for new buffers. (setq default-major-mode 'text-mode) (setq auto-mode-alist (cons '("\\.txt$" . text-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("mutt" . mail-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.html$" . html-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.htm$" . html-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.xml$" . xml-mode) auto-mode-alist)) ;; Change ispelll dictionary depending on the filename (setq-default ispell-dictionary "deutsch8") ;; Standard Deutsch (setq-default ispell-program-name "aspell") ;; aspell statt ispell (add-hook 'find-file-hooks (function (lambda () (if (string-match "\\.de\\.txt$" buffer-file-name) (ispell-change-dictionary "deutsch8")) (if (string-match "\\.en\\.txt$" buffer-file-name) (ispell-change-dictionary "british")) ))) ;; for some reason Emacs lacks delete-line, implementing it with the ;; source from kill-line is, however, trivial (defun delete-line (&optional arg) (interactive "P") (delete-region (point) (progn (if arg (forward-visible-line (prefix-numeric-value arg)) (if (eobp) (signal 'end-of-buffer nil)) (if (or (looking-at "[ \t]*$") (and kill-whole-line (bolp))) (forward-visible-line 1) (end-of-visible-line))) (point))) ) (global-set-key (kbd "C-k") 'delete-line) (global-set-key "\M-g" 'goto-line) ; ESC-g goto Line ;; Trailing whitespaces (setq show-trailing-whitespace t);; Meta-x delete-trailing-whitespace ;; abbrev mode (read-abbrev-file abbrev-file-name t) (setq dabbrev-case-replace nil) ; Preserve case when expanding (setq-default abbrev-mode t) ;; Unicode input with emacs -nw (when (not window-system) (set-keyboard-coding-system locale-coding-system) (set-terminal-coding-system locale-coding-system) ) ;; no more beep (setq visible-bell t)