Explore environment for abilities and tup config in ~/.emacs-autogen.
--- a/.emacs Sun Apr 25 22:08:56 2010 +0300
+++ b/.emacs Sun Apr 25 23:09:13 2010 +0300
@@ -19,11 +19,18 @@
(defvar my-autoload (concat my-lisp-dir "/autoload-my.el")
"Path to autoload for mode files.")
+(defvar dot-emacs-autogen (expand-file-name "~/.emacs-autogen")
+ "Path to automatically generated config file. It content depend on
+ installation environment and it was overridden on install.")
(defvar dot-emacs-pre (expand-file-name "~/.emacs-pre")
"Path to file with pre-loaded custom settings.")
(defvar dot-emacs-post (expand-file-name "~/.emacs-post")
"Path to file with post-loaded custom settings.")
+
+(if (file-exists-p dot-emacs-autogen)
+ (load dot-emacs-autogen))
+
;; pre-load custom settings
(if (file-exists-p dot-emacs-pre)
(load dot-emacs-pre))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.emacs-autogen Sun Apr 25 23:09:13 2010 +0300
@@ -0,0 +1,3 @@
+;; -*- mode: lisp; coding: utf-8; fill-column: 78 -*-
+;;
+;; For load order see README.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.emacs-autogen.sh Sun Apr 25 23:09:13 2010 +0300
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+if [ -z "$1" ]; then
+ echo "Where config file?"
+ exit 1
+fi
+
+cfg=$1
+
+if which aspell; then
+ echo >>$cfg
+ echo "(setq-default ispell-program-name \"aspell\")" >>$cfg
+ echo "(setq-default ispell-local-dictionary \"english\")" >>$cfg
+fi
--- a/Makefile Sun Apr 25 22:08:56 2010 +0300
+++ b/Makefile Sun Apr 25 23:09:13 2010 +0300
@@ -34,6 +34,8 @@
if [ ! -f $(HOME)/$$file ]; then cp $$file $(HOME)/$$file; fi; \
done
cp .emacs $(HOME)/.emacs
+ cp .emacs-autogen $(HOME)/.emacs-autogen
+ sh .emacs-autogen.sh $(HOME)/.emacs-autogen
cp .emacs-my $(HOME)/.emacs-my
rm -f -r $(HOME)/.emacs.d/my-lisp
mkdir -p $(HOME)/.emacs.d/my-lisp
--- a/README Sun Apr 25 22:08:56 2010 +0300
+++ b/README Sun Apr 25 23:09:13 2010 +0300
@@ -9,6 +9,9 @@
Main Emacs config file is '~/.emacs'. I decide don't store beside it all
customisations. Instead it simply load files in such order:
+ '~/.emacs-autogen'
+ It content depend on installation environment. Automatically
+ generated.
'~/.emacs-pre'
For manually written customisation (usually for updating
load-path) which can affect on '.emacs-my'. Will not be