2021-01-27 22:49:20 +00:00
|
|
|
;;; FG42 --- The mighty editor for the emacsians -*- lexical-binding: t; -*-
|
|
|
|
;;
|
2024-02-18 16:08:02 +00:00
|
|
|
;; Copyright (c) 2010-2024 Sameer Rahmani <lxsameer@gnu.org>
|
2021-01-27 22:49:20 +00:00
|
|
|
;;
|
|
|
|
;; Author: Sameer Rahmani <lxsameer@gnu.org>
|
2022-12-19 21:07:48 +00:00
|
|
|
;; URL: https://devheroes.codes/FG42/FG42
|
2024-04-05 21:04:36 +01:00
|
|
|
;; Version: 4.0.0
|
2021-01-27 22:49:20 +00:00
|
|
|
;;
|
|
|
|
;; This program is free software; you can redistribute it and/or modify
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
|
|
|
;;
|
|
|
|
;; This program is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
;;
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
|
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
;;
|
|
|
|
;;; Commentary:
|
2024-02-20 14:53:50 +00:00
|
|
|
;; This is the very first file that Emacs will load to setup FG42
|
2021-01-27 22:49:20 +00:00
|
|
|
;;; Code:
|
2024-02-20 14:53:50 +00:00
|
|
|
(when (string= (getenv "FG42_DEBUG") "1")
|
|
|
|
(setq debug-on-error t))
|
2024-02-18 15:50:18 +00:00
|
|
|
|
2024-03-21 19:37:50 +00:00
|
|
|
|
2024-02-18 15:50:18 +00:00
|
|
|
(eval-when-compile
|
|
|
|
(defvar package-archives)
|
|
|
|
(defvar use-package-ensure-function))
|
|
|
|
|
2024-03-21 19:37:50 +00:00
|
|
|
|
|
|
|
(defgroup fg42 nil
|
|
|
|
"Customize your FG42 instance via this group of configurations.")
|
|
|
|
|
|
|
|
(defvar fg42/disabled-features nil
|
|
|
|
"List of features to disable.")
|
|
|
|
|
|
|
|
(defvar fg42/after-init-hook nil
|
|
|
|
"The hook tha runs when FG42 finished running the user configuration.")
|
|
|
|
|
|
|
|
(defvar fg42/debug-p nil
|
|
|
|
"The hook tha runs when FG42 finished running the user configuration.")
|
|
|
|
|
|
|
|
(defvar fg42-home (or (getenv "FG42_HOME") "~/.fg42")
|
|
|
|
"The pass to fg42-home.")
|
|
|
|
|
|
|
|
(defvar fg42-tmp (make-temp-file "fg42-" t))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(add-to-list 'load-path (concat (getenv "FG42_HOME") "/lisp"))
|
2021-01-27 22:49:20 +00:00
|
|
|
|
2024-02-20 14:53:50 +00:00
|
|
|
;; (when fg42-use-nix
|
|
|
|
;; (require 'site-start))
|
2021-01-27 22:49:20 +00:00
|
|
|
|
2021-03-05 16:30:30 +00:00
|
|
|
;; Prevent package.el to install anything at startup
|
|
|
|
(setq package-enable-at-startup nil)
|
2024-02-18 15:50:18 +00:00
|
|
|
(setq package-archives nil)
|
|
|
|
|
2024-03-21 19:37:50 +00:00
|
|
|
(setq use-package-ensure-function 'ignore)
|
2021-07-16 22:26:16 +01:00
|
|
|
(setq tab-width 2)
|
|
|
|
|
2024-02-20 14:53:50 +00:00
|
|
|
(let ((emacsd (or (getenv "FG42_EMACSD") (format "%s/emacs.d" (getenv "FG42_HOME")))))
|
2024-02-16 12:44:50 +00:00
|
|
|
(setq custom-file (format "%s/.fg42.custom.el" emacsd))
|
|
|
|
(setq user-emacs-directory emacsd)
|
|
|
|
(setq user-init-file
|
|
|
|
(or (getenv "FG42_CONFIG_FILE")
|
2024-03-21 19:37:50 +00:00
|
|
|
(format "%s/.fg42.v4.el"
|
2024-02-16 17:30:29 +00:00
|
|
|
(getenv "HOME")))))
|
2015-07-09 12:05:26 +01:00
|
|
|
|
2024-03-21 19:37:50 +00:00
|
|
|
|
2023-05-31 23:37:58 +01:00
|
|
|
;; Load the customization file. In FG42 it is different than
|
2021-03-06 18:40:57 +00:00
|
|
|
;; the default `user-init-file'
|
2021-03-05 16:30:30 +00:00
|
|
|
(if (file-exists-p custom-file)
|
|
|
|
(load custom-file))
|
2015-07-21 10:05:52 +01:00
|
|
|
|
2024-03-21 19:37:50 +00:00
|
|
|
|
2021-03-05 16:30:30 +00:00
|
|
|
(require 'fg42)
|
2024-03-21 19:37:50 +00:00
|
|
|
(fg42/initialize-v4)
|
2021-01-27 22:49:20 +00:00
|
|
|
|
2024-02-20 14:53:50 +00:00
|
|
|
(provide 'fg42/init)
|
|
|
|
;;; init.el ends here
|