-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathontop.el
63 lines (54 loc) · 2.54 KB
/
ontop.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
;;; ontop.el --- Emacs ONTOP extension layer -*- lexical-binding: t; -*-
;;
;; ▒░▒░▒░ ▒░ ▒░ ▒░▒░▒░▒░▒░ ▒░▒░▒░ ▒░▒░▒░▒░
;; ▒░ ▒░ ▒░▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░
;; ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░
;; ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░▒░▒░▒░
;; ▒░ ▒░ ▒░ ▒░▒░ ▒░ ▒░ ▒░ ▒░
;; ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░
;; ▒░▒░▒░ ▒░ ▒░ ▒░ ▒░▒░▒░ ▒░
;;
;;; Commentary:
;; Emacs ONTOP is an extension on top of the Emacs ONBOARD starter-kit
;;
;;
;; ---> LOAD THIS FILE from your init file `~/.emacs.d/init.el' or `~/.emacs'
;; via (load-file (expand-file-name "~/.emacs.ontop/ontop.el"))
;;
;;
;; Copyright (C) 2022-2024 Dan Dee
;; Author: Dan Dee <[email protected]>
;; URL: https://github.com/monkeyjunglejuice/emacs.ontop
;; Version: 0.7.0
;; Package-Requires: ((EMACS "28.2"))
;; Keywords: convenience
;; SPDX-License-Identifier: MIT
;; This file is not part of GNU Emacs.
;;; Code:
;; ____________________________________________________________________________
;;; LOADER
;; Define the path of the Emacs ONTOP directory
(defvar eon-ontop-directory
(file-name-directory (or load-file-name (buffer-file-name)))
"The directory that contains the file ontop.el and its modules.")
;; Add the Emacs ONTOP directory to the `load-path`, so that we can `require`
;; modules or do `load-library` and `unload-feature` on the fly.
(add-to-list 'load-path eon-ontop-directory)
;; Define the initial module list
(defvar eon-modules '()
"List of selected modules, implemented as Emacs features.
It is empty per default, and will be set in `ontop-setup-modules.el'.")
;; Don't block if an error occurs
(defun eon-require-with-error-handling (feature)
"Require FEATURE, reporting an error if loading fails."
(condition-case err
(require feature)
(error (message "Failed to load %s: %s" feature err))))
;; Require and read your module selection
(eon-require-with-error-handling 'ontop-setup-modules)
;; Require the selected modules; install Emacs packages when necessary
(dolist (module eon-modules)
(eon-require-with-error-handling module))
;; ____________________________________________________________________________
(provide 'ontop)
;;; ontop.el ends here