style: file explanations and loading

This commit changes the way files are loaded. Instead of being
'require'd and 'provide'd, they are simply 'load'ed, having a positive
impact on performance and code quality.

Additionally, the headings of file (which thus far have began with
three semicolons) now begin with two to fit Emacs lisp conventions.
This commit is contained in:
Muhammad Nauman Raza 2022-11-12 17:53:29 +00:00
parent 71f427ca8b
commit 416e6640d6
No known key found for this signature in database
GPG key ID: A9A36C429C9CAE31
7 changed files with 12 additions and 26 deletions

10
init.el
View file

@ -35,9 +35,9 @@
(convert-standard-filename "lisp/"))) (convert-standard-filename "lisp/")))
;; Load the code of some external files ;; Load the code of some external files
(require 'interface) (load "interface")
(require 'editor) (load "editor")
(require 'org-mode) (load "org-mode")
(require 'keybinds) (load "keybinds")
(require 'performance) (load "performance")
(load "language") (load "language")

View file

@ -1,4 +1,4 @@
;;; This file customizes Emacs' editor ;; This file customizes Emacs' editor
;; Quit input dialogues after pressing escape once ;; Quit input dialogues after pressing escape once
(global-set-key (kbd "<escape>") 'keyboard-escape-quit) (global-set-key (kbd "<escape>") 'keyboard-escape-quit)
@ -74,6 +74,3 @@
"p" '(:wk "Projects")) "p" '(:wk "Projects"))
(set-face-foreground 'vertical-border (face-background 'default)) (set-face-foreground 'vertical-border (face-background 'default))
;; Provide this file to init.el
(provide 'editor)

View file

@ -1,4 +1,4 @@
;;; This file contains configuration for Emacs interface elements. ;; This file contains configuration for Emacs interface elements.
;; Stop Emacs from resizing the window at startup ;; Stop Emacs from resizing the window at startup
(setq frame-resize-pixelwise t) (setq frame-resize-pixelwise t)
@ -47,6 +47,3 @@
(use-package diredfl ; Colourise dired! (use-package diredfl ; Colourise dired!
:hook dired-mode) :hook dired-mode)
;; Provide this file to init.el
(provide 'interface)

View file

@ -1,4 +1,4 @@
;;; This file contains keybindings for Dianciemacs ;; This file contains keybindings for Dianciemacs
;; Files ;; Files
(general-create-definer diancite/file (general-create-definer diancite/file
@ -18,6 +18,3 @@
"m s" '(magit-status :wk "Status") "m s" '(magit-status :wk "Status")
"m d" '(magit-dispatch :wk "Dispatch") "m d" '(magit-dispatch :wk "Dispatch")
"m f" '(magit-status :wk "File Dispatch")) "m f" '(magit-status :wk "File Dispatch"))
;; Provide file file init.el
(provide 'keybinds)

View file

@ -1,4 +1,4 @@
;;; This file contains configuration for languages ;; This file contains configuration for languages
;; Markdown ;; Markdown
(use-package markdown-mode) (use-package markdown-mode)

View file

@ -1,4 +1,5 @@
;;; This file contains configuration for Emacs' org-mode ;; This file contains configuration for Emacs' org-mode
;;; org-mode ;; org-superstar ;;; org-mode ;; org-superstar
(use-package org-superstar (use-package org-superstar
:config :config
@ -82,6 +83,3 @@
"n a" '(org-agenda :wk "Agenda")) "n a" '(org-agenda :wk "Agenda"))
(setq org-agenda-files (quote ("~/Org"))) (setq org-agenda-files (quote ("~/Org")))
;; Provide this file to init.el
(provide 'org-mode)

View file

@ -1,4 +1,4 @@
;;; This file improves the performance of Emacs, startup or otherwise ;; This file improves the performance of Emacs, startup or otherwise
;; Reduce garbage collection at startup ;; Reduce garbage collection at startup
(setq gc-cons-threshold most-positive-fixnum) (setq gc-cons-threshold most-positive-fixnum)
@ -7,6 +7,3 @@
(add-hook 'emacs-startup-hook (add-hook 'emacs-startup-hook
(lambda () (lambda ()
(setq gc-cons-threshold (expt 2 23)))) (setq gc-cons-threshold (expt 2 23))))
;; Provide this file to init.el
(provide 'performance)