emacs.d

My Emacs configuration
git clone https://git.jamzattack.xyz/emacs.d
Log | Files | Refs | LICENSE

init.el (1300B)


      1 ;; -*- lexical-binding: t; -*-
      2 
      3 (when (boundp 'comp-deferred-compilation)
      4   (setq comp-deferred-compilation t))
      5 
      6 (with-eval-after-load 'epg-config
      7   (setq epg-pinentry-mode 'loopback))
      8 
      9 ;; Settings for graphical instance
     10 (setq x-wait-for-event-timeout nil	; remove frame creation delay
     11       frame-resize-pixelwise t)		; frames resize by pixel
     12 
     13 ;; Prefer newer files rather than old byte-compiled ones
     14 (setq load-prefer-newer t)
     15 
     16 ;; Move custom-file to the lisp directory
     17 (setq custom-file (locate-user-emacs-file "lisp/custom-file.el"))
     18 
     19 ;; Add the lisp directory to `load-path'
     20 (add-to-list 'load-path (locate-user-emacs-file "lisp"))
     21 
     22 ;; Define a function that loads my config file
     23 (defun config-load (&optional tangle)
     24   "Load my config file.
     25 
     26 Load \"config.el\".  If \"config.el\" doesn't exist, or if prefix
     27 arg TANGLE is non-nil, tangle \"config.org\" first."
     28   (interactive "P")
     29   (if tangle
     30       (let ((org (locate-user-emacs-file "config.org")))
     31 	(require 'org)
     32 	(org-babel-tangle-file org)
     33 	(load "config" t))
     34     (unless (load "config" t)
     35       (config-load t))))
     36 
     37 ;; Enable all local variables temporarily, for `desktop-read'
     38 (let ((enable-local-variables :all))
     39   ;; Load custom.el
     40   (when (file-exists-p custom-file)
     41     (load-file custom-file))
     42   ;; Load config.org
     43   (config-load))