(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) (if (file-directory-p "~/.backup") (setq backup-directory-alist '(("." . "~/.backup"))) (message "Directory does not exist: ~/.backup")) (setq backup-by-copying t ; Don't delink hardlinks delete-old-versions t ; Clean up the backups kept-new-versions 3 ; keep some new versions kept-old-versions 2 ; and some old ones, too version-control t) ; Use version numbers on backups ;; Do not persist customizations (setq custom-file (make-temp-file "emacs-custom-")) ;; Global keybindings (global-set-key (kbd "C-c R") 'revert-buffer) (global-set-key (kbd "C-c w") 'whitespace-cleanup) (defun help/insert-em-dash () "Inserts an EM-DASH (not a HYPEN, not an N-DASH)" (interactive) (insert "—")) (global-set-key (kbd "C--") #'help/insert-em-dash) (setq fill-column 79) ; Wrap lines (setq mouse-yank-at-point t) ; Do not follow mouse curors when mouse-yanking (setq-default indent-tabs-mode nil) ; No tabs when indenting (setq-default tab-width 4) ; How many spaces a tab represents (setq initial-scratch-message "") (defalias 'yes-or-no-p 'y-or-n-p) ;; Only flash the mode line (setq ring-bell-function (lambda () (let ((orig-fg (face-foreground 'mode-line))) (set-face-foreground 'mode-line "#F2804F") (run-with-idle-timer 0.1 nil (lambda (fg) (set-face-foreground 'mode-line fg)) orig-fg)))) ;; Highlight parens (setq show-paren-delay 0) (show-paren-mode 1) (savehist-mode 1) ; Save histories, including minibuffer (save-place-mode 1) ; Remember and restore cursor information (setq auto-save-no-message t) ; Do not print a message when auto-saving (pixel-scroll-precision-mode 1) ; Precision scrolling ;; Server (require 'server) (setq server-client-instructions nil) ; Keep it quiet when opening an ec (unless (server-running-p) (server-start)) (dolist (path '("~/.emacs.d/rul-lisp/config" "~/.emacs.d/rul-lisp/packages")) (add-to-list 'load-path path)) (require 'rul-completion) (require 'rul-fm) (require 'rul-prog) (require 'rul-elfeed) (require 'rul-modeline) (require 'rul-media) (require 'rul-org) (require 'rul-wm) (require 'rul-write) ;; Init parts (will be deprecated in favor of packages) (load-file "~/.emacs.d/rul-init.d/themes.el") (load-file "~/.emacs.d/rul-init.d/auto-fill.el") (load-file "~/.emacs.d/rul-init.d/flycheck.el") (load-file "~/.emacs.d/rul-init.d/flyspell.el") (load-file "~/.emacs.d/rul-init.d/fonts.el") (load-file "~/.emacs.d/rul-init.d/go-lang.el") (load-file "~/.emacs.d/rul-init.d/hydra.el") (load-file "~/.emacs.d/rul-init.d/ibuffer.el") (load-file "~/.emacs.d/rul-init.d/imenu.el") (load-file "~/.emacs.d/rul-init.d/latex.el") (load-file "~/.emacs.d/rul-init.d/logos.el") (load-file "~/.emacs.d/rul-init.d/magit.el") (load-file "~/.emacs.d/rul-init.d/mail-mode.el") (load-file "~/.emacs.d/rul-init.d/markdown.el") (load-file "~/.emacs.d/rul-init.d/notmuch.el") (load-file "~/.emacs.d/rul-init.d/vterm.el") (load-file "~/.emacs.d/rul-init.d/which-key.el") (when-let* ((file (locate-user-emacs-file "rul-post-init.el")) ((file-exists-p file))) (load-file file)) ;; init.el ends here