Skip to content

Latest commit

 

History

History
70 lines (55 loc) · 1.91 KB

config.org

File metadata and controls

70 lines (55 loc) · 1.91 KB

Literate Emacs Configuration

Generic Config

Enable the use of common lisp

emacs lisp is not common lisp but can use cl libraries through this bridge.

(require 'cl-lib)

Start emacs maximized

Quite Obviously you want to start Maximized.

(add-to-list 'default-frame-alist '(fullscreen . maximized))

Tune Emacs GC for faster startup.

Temporarily set gc threshold to largest possible number so that there are no gc pauses during startup. Reset to a sane threshold via hook after the restart is done.

(defvar best-gc-cons-threshold
  4000000)
(setq gc-cons-threshold most-positive-fixnum)

;; Restore back
(add-hook 'after-init-hook #'(lambda ()
                               (setq gc-cons-threshold best-gc-cons-threshold)))

Sane Defaults

Sane default here

(tool-bar-mode -1)
;; Skip the default splash screen.
(setq inhibit-startup-screen t)
(setq delete-old-versions -1 )
(setq ring-bell-function 'ignore )
(setq coding-system-for-read 'utf-8 )
(setq coding-system-for-write 'utf-8 )
(setq initial-scratch-message "")
(setq browse-url-browser-function 'browse-url-firefox)
(fset 'yes-or-no-p 'y-or-n-p)
(setq custom-file (expand-file-name "~/.emacs.d/custom.el"))

Useful Miscellany

(setq hostname (replace-regexp-in-string "\\(^[[:space:]\n]*\\|[[:space:]\n]*$\\)" "" (with-output-to-string (call-process "hostname" nil standard-output))))

(setq dotfiles-dir (file-name-directory
                    (or (buffer-file-name) (file-chase-links load-file-name))))


(set-register ?i (cons 'file "~/.emacs.d/init.el"))

Provide this so that it may be required

(provide 'config)