# HG changeset patch # User "Oleksandr Gavenko " # Date 1228689334 18000 # Node ID 1c9a7ccc584a7796faa68b11c555c72316e3a870 # Parent 359f03f8a64b2f23977887e1f53c0ec2e2bac0bc# Parent def084f6e280730278b4495380c0dc90ed088646 merge diff -r 359f03f8a64b -r 1c9a7ccc584a .emacs --- a/.emacs Thu Nov 13 09:39:58 2008 +0200 +++ b/.emacs Sun Dec 07 17:35:34 2008 -0500 @@ -1,7 +1,8 @@ ;; -*- mode: lisp; coding: cp1251 -*- ;; ;; Copyright (C) 2008 by Oleksandr Gavenko -;; 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. diff -r 359f03f8a64b -r 1c9a7ccc584a .emacs-my --- a/.emacs-my Thu Nov 13 09:39:58 2008 +0200 +++ b/.emacs-my Sun Dec 07 17:35:34 2008 -0500 @@ -2,11 +2,9 @@ ;; ;; Copyright (C) 2008 by Oleksandr Gavenko ;; -;; ~/.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 diff -r 359f03f8a64b -r 1c9a7ccc584a .emacs-my-post --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs-my-post Sun Dec 07 17:35:34 2008 -0500 @@ -0,0 +1,2 @@ +;; -*- lisp -*- +;; Lastly .emacs load this file, after .emacs-my. diff -r 359f03f8a64b -r 1c9a7ccc584a .emacs-my-pre --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs-my-pre Sun Dec 07 17:35:34 2008 -0500 @@ -0,0 +1,2 @@ +;; -*- lisp -*- +;; Firstly .emacs load this file, then .emacs-my. diff -r 359f03f8a64b -r 1c9a7ccc584a INSTALL --- a/INSTALL Thu Nov 13 09:39:58 2008 +0200 +++ b/INSTALL Sun Dec 07 17:35:34 2008 -0500 @@ -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 diff -r 359f03f8a64b -r 1c9a7ccc584a Makefile --- a/Makefile Thu Nov 13 09:39:58 2008 +0200 +++ b/Makefile Sun Dec 07 17:35:34 2008 -0500 @@ -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