# HG changeset patch # User Oleksandr Gavenko # Date 1425208230 -7200 # Node ID 4f22d9fe2e5b1c2770d3d056f9f51353218e95be # Parent b086f9c8a4dbcc0381c6e214639a321a7c8004fe Byte compile '.emacs-my' and 'my/*.el'. diff -r b086f9c8a4db -r 4f22d9fe2e5b .emacs --- a/.emacs Sun Mar 01 13:09:44 2015 +0200 +++ b/.emacs Sun Mar 01 13:10:30 2015 +0200 @@ -9,44 +9,8 @@ ;; ====================================================================== ;; Load path. - -(defvar my-usr-lisp-dir - (expand-file-name "~/usr/share/emacs/site-lisp") - "Here live additional lisp packages.") -(when (file-directory-p my-usr-lisp-dir) - (add-to-list 'load-path my-usr-lisp-dir) - (let ((default-directory my-usr-lisp-dir)) - (normal-top-level-add-subdirs-to-load-path))) - -(unless (boundp 'user-emacs-directory) - (setq user-emacs-directory "~/.emacs.d/")) - -(defvar my-lisp-dir - (expand-file-name (concat user-emacs-directory "my/")) - "Here live my lisp packages.") -(add-to-list 'load-path my-lisp-dir) - -(setq custom-file (concat user-emacs-directory ".emacs-custom")) -(if (file-exists-p custom-file) - (load custom-file)) - -(defvar my-lisp-autoload (concat my-lisp-dir "loaddefs.el") - "Path to autoload for mode files.") -(defvar my-lisp-auth (concat user-emacs-directory ".emacs-auth") - "Path to auth info for Emacs.") -(defvar my-lisp-autogen (concat user-emacs-directory ".emacs-autogen") - "Path to automatically generated config file. It content depend on - installation environment and it was overridden on install.") -(defvar my-lisp-pre (concat user-emacs-directory ".emacs-pre") - "Path to file with pre-settings. Intended for local modifications.") -(defvar my-lisp-dotemacs (concat user-emacs-directory ".emacs-my") - "Path to file with settings. Overwritten on install.") -(defvar my-lisp-post (concat user-emacs-directory ".emacs-post") - "Path to file with post-settings. Intended for local modifications.") - -(setq save-place-file (concat user-emacs-directory ".emacs-places")) -(setq bookmark-default-file (concat user-emacs-directory ".emacs.bmk")) -(setq ido-save-directory-list-file (concat user-emacs-directory ".ido.last")) +(load "~/.emacs.d/.emacs-defs") +(my-load.add-my-loadpaths) (mapc (lambda (fname) diff -r b086f9c8a4db -r 4f22d9fe2e5b .emacs-defs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs-defs Sun Mar 01 13:10:30 2015 +0200 @@ -0,0 +1,39 @@ +;; -*- mode: emacs-lisp; coding: utf-8; fill-column: 78 -*- + +(defvar my-usr-lisp-dir + (expand-file-name "~/usr/share/emacs/site-lisp") + "Here live additional lisp packages.") + +(unless (boundp 'user-emacs-directory) + (setq user-emacs-directory "~/.emacs.d/")) + +(defvar my-lisp-dir + (expand-file-name (concat user-emacs-directory "my/")) + "Here live my lisp packages.") +(add-to-list 'load-path my-lisp-dir) + +(defvar my-lisp-autoload (concat my-lisp-dir "loaddefs.el") + "Path to autoload for mode files.") +(defvar my-lisp-auth (concat user-emacs-directory ".emacs-auth") + "Path to auth info for Emacs.") +(defvar my-lisp-autogen (concat user-emacs-directory ".emacs-autogen") + "Path to automatically generated config file. It content depend on + installation environment and it was overridden on install.") +(defvar my-lisp-pre (concat user-emacs-directory ".emacs-pre") + "Path to file with pre-settings. Intended for local modifications.") +(defvar my-lisp-dotemacs (concat user-emacs-directory ".emacs-my") + "Path to file with settings. Overwritten on install.") +(defvar my-lisp-post (concat user-emacs-directory ".emacs-post") + "Path to file with post-settings. Intended for local modifications.") + +(setq custom-file (concat user-emacs-directory ".emacs-custom")) +(setq save-place-file (concat user-emacs-directory ".emacs-places")) +(setq bookmark-default-file (concat user-emacs-directory ".emacs.bmk")) +(setq ido-save-directory-list-file (concat user-emacs-directory ".ido.last")) + +(defun my-load.add-my-loadpaths () + (when (file-directory-p my-usr-lisp-dir) + (add-to-list 'load-path my-usr-lisp-dir) + (let ((default-directory my-usr-lisp-dir)) + (normal-top-level-add-subdirs-to-load-path)))) + diff -r b086f9c8a4db -r 4f22d9fe2e5b Makefile --- a/Makefile Sun Mar 01 13:09:44 2015 +0200 +++ b/Makefile Sun Mar 01 13:10:30 2015 +0200 @@ -24,6 +24,7 @@ # Helper definition. which = $(firstword $(foreach item,$(subst :, ,$(PATH)),$(wildcard $(item)/$1))) +curdir := $(realpath .) ################################################################ # Platform/environment definition. @@ -113,12 +114,15 @@ [ -f $(emacsdir)/$$file ] || cp $$file $(emacsdir)/$$file; \ done cp .emacs $(emacsdir)/init.el - cp .emacs-my $(emacsdir)/.emacs-my + cp .emacs-defs .emacs-my $(emacsdir) mkdir -p $(emacsdir)/server $(HOME)/.gnus/scores cp all.SCORE $(HOME)/.gnus/scores cp -f $(EL_FILES) $(mylispdir); \ + ./.emacs-autogen.sh $(emacsdir)/.emacs-autogen; \ $(EMACS) -Q --batch --eval='(let ((generated-autoload-file "$(mylispdir)/loaddefs.el")) (update-directory-autoloads "$(mylispdir)"))' - ./.emacs-autogen.sh $(emacsdir)/.emacs-autogen + \ +$(EMACS) -Q --batch --eval='(load "$(curdir)/.emacs-defs")' --eval='(my-load.add-my-loadpaths)' --eval='(load "$(emacsdir)/.emacs-pre")' \ + --eval='(byte-compile-file "$(emacsdir)/.emacs-my")' --eval='(byte-force-recompile "$(mylispdir)")' cp -r srecode/ $(HOME)/.emacs.d/ .PHONY: uninstall