Commit 876f30fa authored by Frank Terbeck's avatar Frank Terbeck

Add early-init.el

parent 8886181e
......@@ -131,6 +131,7 @@ sub ft_register_all {
my ($dest) = @_;
my $emacs_d = $dest . q{/.emacs.d};
ft_emacs_register('early-init.el', $emacs_d);
ft_emacs_register('init.el', $emacs_d);
ft_emacs_register('gnus.el', $emacs_d);
deploy_directory($emacs_d . "/server");
......
......@@ -140,8 +140,9 @@ otherwise."
;(message (format "-!- [Directory change: \"%s\"]" d))
(cd d)))
;; Byte-compile the two main configuration files:
;; Byte-compile the main configuration files:
(ft/cd ft/base-dir)
(ft/recompile-file "early-init.el")
(ft/recompile-file "init.el")
(ft/recompile-file "gnus.el")
......
(eval-and-compile
(require 'package)
(setq package-user-dir
(file-name-as-directory
(expand-file-name (format "elpa-%s" emacs-major-version)
user-emacs-directory))))
(when (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
(when (fboundp 'menu-bar-mode) (menu-bar-mode -1))
(when (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(defvar ft/with-early-init-el t)
......@@ -33,6 +33,11 @@
(message "Loading emacs setup...")
(eval-and-compile
(setq early-init-file (expand-file-name "early-init.el"
user-emacs-directory))
(unless (and (boundp 'ft/with-early-init-el))
(load early-init-file)
(package-initialize))
(mapc (lambda (x)
(add-to-list 'load-path
(expand-file-name x user-emacs-directory)))
......@@ -46,17 +51,11 @@
(ft/load-elisp-file "init-pre.el")
(eval-and-compile
(ft/call-with-function 'package-initialize
(progn
(require 'package)
(setq package-enable-at-startup nil)
(setq package-archives
'(("org" . "http://orgmode.org/elpa/")
("gnu" . "http://elpa.gnu.org/packages/")
("melpa" . "http://melpa.org/packages/")
("marmalade" . "https://marmalade-repo.org/packages/")))
(unless package-archive-contents
(package-refresh-contents)))))
(setq package-archives
'(("org" . "http://orgmode.org/elpa/")
("gnu" . "http://elpa.gnu.org/packages/")
("melpa" . "http://melpa.org/packages/")
("marmalade" . "https://marmalade-repo.org/packages/"))))
;; Enable evil for vi(m) goodness.
(defvar evil-want-C-u-scroll t)
......@@ -205,9 +204,10 @@
(line-number-mode t)
(prefer-coding-system 'utf-8)
(ft/call-with-function 'scroll-bar-mode (scroll-bar-mode -1))
(ft/call-with-function 'menu-bar-mode (menu-bar-mode 0))
(ft/call-with-function 'tool-bar-mode (tool-bar-mode -1))
(unless ft/with-early-init-el
(when (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
(when (fboundp 'menu-bar-mode) (menu-bar-mode -1))
(when (fboundp 'tool-bar-mode) (tool-bar-mode -1)))
(defun info-mode ()
"Take the current buffer (hopefully) containing texinfo data, and launch it
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment