--- a/.emacs Wed Dec 03 12:43:51 2008 +0200
+++ b/.emacs Tue Dec 09 09:06:11 2008 +0200
@@ -1,7 +1,8 @@
;; -*- mode: lisp; coding: cp1251 -*-
;;
;; Copyright (C) 2008 by Oleksandr Gavenko <gavenkoa@gmail.com>
-;; Copyright (C) 2008 by Гавенко Алескандр
+;;
+;; ~/.emacs firstly load ~/.emacs-my-pre, then ~/.emacs-my, then ~/.emacs-my-post.
;; ======================================================================
;; Load path.
@@ -15,21 +16,21 @@
(add-to-list 'load-path my-el-dir)
(add-to-list 'load-path my-usr-el-dir)
-(defvar dot-emacs-my-custom-pre (expand-file-name "~/.emacs-my-custom-pre")
+(defvar dot-emacs-my-pre (expand-file-name "~/.emacs-my-pre")
"Path to file with pre-loaded custom settings.")
-(defvar dot-emacs-my-custom-post (expand-file-name "~/.emacs-my-custom-post")
+(defvar dot-emacs-my-post (expand-file-name "~/.emacs-my-post")
"Path to file with post-loaded custom settings.")
;; pre-load custom settings
-(if (file-exists-p dot-emacs-my-custom-pre)
- (load dot-emacs-my-custom-pre))
+(if (file-exists-p dot-emacs-my-pre)
+ (load dot-emacs-my-pre))
;; load main customization
(load "~/.emacs-my")
;; post-load custom settings
-(if (file-exists-p dot-emacs-my-custom-post)
- (load dot-emacs-my-custom-post))
+(if (file-exists-p dot-emacs-my-post)
+ (load dot-emacs-my-post))
(custom-set-variables
;; custom-set-variables was added by Custom.
--- a/.emacs-my Wed Dec 03 12:43:51 2008 +0200
+++ b/.emacs-my Tue Dec 09 09:06:11 2008 +0200
@@ -2,11 +2,9 @@
;;
;; Copyright (C) 2008 by Oleksandr Gavenko <gavenkoa@gmail.com>
;;
-;; ~/.emacs file for GNU Emacs 21.
-
-;; silent runing
-;; (setq inhibit-splash-screen t) ; nonexist on 21.4.1
-(setq inhibit-startup-message t)
+;; .emacs file for GNU Emacs.
+;;
+;; ~/.emacs load this file after ~/.emacs-my-pre, but before ~/.emacs-my-post.
;; ======================================================================
;; Debugging.
@@ -23,18 +21,6 @@
(setq debug-on-error nil) ; t/nil
;; ======================================================================
-;; GNU Serv.
-
-;; (load "~/emacs/bin/gnuserv/gnuserv.el")
-;; (require 'gnuserv)
-;; (setq gnuserv-frame (selected-frame))
-
-(server-start)
-
-;; (desktop-load-default)
-;; (desktop-read)
-
-;; ======================================================================
;; Настройка внешнего вида редактора.
;; View.
@@ -66,6 +52,24 @@
)
)
+;; ----------------------------------------------------------------------
+;; Silent runing.
+
+;; (setq inhibit-splash-screen t) ; nonexist on 21.4.1
+(setq inhibit-startup-message t)
+
+;; ======================================================================
+;; GNU Serv.
+
+;; (load "~/emacs/bin/gnuserv/gnuserv.el")
+;; (require 'gnuserv)
+;; (setq gnuserv-frame (selected-frame))
+
+(server-start)
+
+;; (desktop-load-default)
+;; (desktop-read)
+
;; ======================================================================
;; Standart settings
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.emacs-my-post Tue Dec 09 09:06:11 2008 +0200
@@ -0,0 +1,2 @@
+;; -*- lisp -*-
+;; Lastly .emacs load this file, after .emacs-my.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.emacs-my-pre Tue Dec 09 09:06:11 2008 +0200
@@ -0,0 +1,2 @@
+;; -*- lisp -*-
+;; Firstly .emacs load this file, then .emacs-my.
--- a/INSTALL Wed Dec 03 12:43:51 2008 +0200
+++ b/INSTALL Tue Dec 09 09:06:11 2008 +0200
@@ -14,11 +14,11 @@
* Организация файлов настроек.
-По умолчанию код .emacs загружает файл "$HOME/.emacs-my-custom-pre", затем
-"$HOME/.emacs-my", затем "$HOME/.emacs-my-custom-post".
+По умолчанию код .emacs загружает файл "$HOME/.emacs-my-pre", затем
+"$HOME/.emacs-my", затем "$HOME/.emacs-my-post".
-".emacs-my" хранит общие настройки для всех инсталяций, файлы ".emacs-my-custom-pre" и
-".emacs-my-custom-post" содержат настройки для локальной инсталяции.
+".emacs-my" хранит общие настройки для всех инсталяций, файлы ".emacs-my-pre" и
+".emacs-my-post" содержат настройки для локальной инсталяции.
Дополнительные загружаемые модули я решил сохраниять в `$HOME/.el'.
@@ -31,7 +31,9 @@
Я решил сохранять файлы настроек в домашнем каталоге основного пользователя,
а для других пользователей делать соотведствующие символические ссылки:
- ln -s /home/other-user/.emacs /home/sasha/.emacs
- ln -s /home/other-user/.emacs-custom.el /home/sasha/.emacs-custom.el
+ ln -s /home/other-user/.emacs /home/user/.emacs
+ ln -s /home/other-user/.emacs-my-pre /home/user/.emacs-my-pre
+ ln -s /home/other-user/.emacs-my /home/user/.emacs-my
+ ln -s /home/other-user/.emacs-my-post /home/user/.emacs-my-post
ln -s /home/other-user/.el /home/sasha/.el
--- a/Makefile Wed Dec 03 12:43:51 2008 +0200
+++ b/Makefile Tue Dec 09 09:06:11 2008 +0200
@@ -8,13 +8,13 @@
all: install
-install: .emacs .emacs-my
- if [ ! -f $$HOME/.emacs ]; then \
- cp .emacs $$HOME/.emacs; \
- fi
- cp .emacs-my $$HOME/.emacs-my
+install: .emacs .emacs-my .emacs-my-pre .emacs-my-post
+ for file in .emacs .emacs-my-pre .emacs-my-post; do \
+ if [ ! -f $(HOME)/$$file ]; then cp $$file $(HOME)/$$file; fi; \
+ done
+ cp .emacs-my $(HOME)/.emacs-my
-install-all: .emacs .emacs-my
+install-all: .emacs .emacs-my .emacs-my-pre .emacs-my-post
for file in $^; do \
cp $$file $(HOME)/$$file; \
done