--- a/.emacs-my Fri Mar 25 15:41:34 2011 +0200
+++ b/.emacs-my Sat Mar 26 15:29:58 2011 +0200
@@ -192,22 +192,16 @@
(setq display-time-default-load-average nil)
(display-time) ; display-time-mode
-(if window-system
- ;; For graphical environment.
- (progn
- (set-background-color "white")
- (set-foreground-color "black")
- (set-cursor-color "brown")
- ;; (set-mouse-color "white")
- (setq cursor-type 'box) ; box, hollow, bar, hbar
- ;;(setq blink-matching-delay 0.01)
- (blink-cursor-mode 1)
- ;; (set-face-font 'default "7x14")
- )
- ;; For tty.
- (progn
- )
-)
+(when window-system
+ (set-background-color "white")
+ (set-foreground-color "black")
+ (set-cursor-color "brown")
+ ;; (set-mouse-color "white")
+ (setq cursor-type 'box) ; box, hollow, bar, hbar
+ ;;(setq blink-matching-delay 0.01)
+ (blink-cursor-mode 1)
+ ;; (set-face-font 'default "7x14")
+ )
;; See what I am typing immediately (for keystroke in minibuffer).
(setq echo-keystrokes 0.2)
@@ -251,8 +245,8 @@
;;; ----------------------------------------------------------------
(message "standart/general settings")
-(if (boundp 'confirm-kill-emacs)
- (setq confirm-kill-emacs 'yes-or-no-p))
+(when (boundp 'confirm-kill-emacs)
+ (setq confirm-kill-emacs 'yes-or-no-p))
;; Try to speed things up, especially in VM.
(setq gc-cons-threshold 2000000)
@@ -497,7 +491,8 @@
(global-set-key (kbd "\e\er") 'query-replace-regexp)
;; Disable suspend. It ugly.
-(if window-system (global-set-key (kbd "C-z") nil))
+(when window-system
+ (global-set-key (kbd "C-z") nil))
(global-set-key (kbd "C-x C-z") nil)
;; (global-set-key [language-change] 'ignore)
@@ -523,26 +518,23 @@
(modify-coding-system-alist 'file "\\.el" 'iso-2022-7bit)
(cond
((equal window-system 'w32) ; also (string-equal system-type "windows-nt")
- (progn
- (set-selection-coding-system 'utf-16-le-dos)
- (setq-default buffer-file-coding-system 'cp1251)
- (setq default-file-name-coding-system 'cp1251)
- (setq default-process-coding-system '(cp1251 . cp1251))
- ))
+ (set-selection-coding-system 'utf-16-le-dos)
+ (setq-default buffer-file-coding-system 'cp1251)
+ (setq default-file-name-coding-system 'cp1251)
+ (setq default-process-coding-system '(cp1251 . cp1251))
+ )
((equal window-system 'x)
- (progn
- (prefer-coding-system 'utf-8-unix)
- (setq selection-coding-system 'compound-text-with-extensions)
- (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))
- (modify-coding-system-alist 'process ".*" 'utf-8-unix)
- ))
+ (prefer-coding-system 'utf-8-unix)
+ (setq selection-coding-system 'compound-text-with-extensions)
+ (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))
+ (modify-coding-system-alist 'process ".*" 'utf-8-unix)
+ )
(t
- (progn
- (prefer-coding-system 'cp1251-dos)
- (prefer-coding-system 'utf-8-unix)
- (modify-coding-system-alist 'process ".*" 'utf-8-unix)
- ))
+ (prefer-coding-system 'cp1251-dos)
+ (prefer-coding-system 'utf-8-unix)
+ (modify-coding-system-alist 'process ".*" 'utf-8-unix)
)
+ )
;;; ----------------------------------------------------------------
(message "open file, ffap, dired")
@@ -642,8 +634,8 @@
(message "compression, archive")
(require 'jka-compr) ; Automatic decompression, hooks for tar-mode.
-(if (fboundp 'auto-compression-mode)
- (auto-compression-mode 1))
+(when (fboundp 'auto-compression-mode)
+ (auto-compression-mode 1))
(modify-coding-system-alist 'file "\\.\\(war\\|ear\\|sar\\|egg\\)\\'" 'no-conversion)
@@ -905,51 +897,48 @@
;; XXX org-todo-keywords '((sequence "TODO" "START" "|" "DONE")) for org-version 4.67c
;; XXX (setq org-todo-keywords '("TODO" "START" "DONE")) for org-version 6.05b
-(if (or (featurep 'org) (featurep 'org-install))
- (progn
- (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
- (setq
- org-directory "~/.gtd"
- org-default-notes-file nil
- org-agenda-ndays 31
- org-deadline-warning-days 7
- org-agenda-show-all-dates t
- org-agenda-format-date "%Y-%m-%d, %A %e %B"
- org-agenda-skip-deadline-if-done t
- org-agenda-skip-scheduled-if-done t
- org-agenda-start-on-weekday nil
- org-reverse-note-order t
- org-hide-leading-stars t
- org-tags-column 64
- )
- (setq my-org-agenda-todo-file "~/.gtd/TODO.org")
- (setq my-org-agenda-note-file "~/.gtd/NOTE.org")
- (setq org-agenda-files `(,my-org-agenda-todo-file ,my-org-agenda-note-file))
- (define-key global-map "\C-ca" 'org-agenda)
- (define-key global-map "\C-ct" (lambda nil (interactive) (find-file my-org-agenda-note-file)))
+(when (or (featurep 'org) (featurep 'org-install))
+ (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
+ (setq
+ org-directory "~/.gtd"
+ org-default-notes-file nil
+ org-agenda-ndays 31
+ org-deadline-warning-days 7
+ org-agenda-show-all-dates t
+ org-agenda-format-date "%Y-%m-%d, %A %e %B"
+ org-agenda-skip-deadline-if-done t
+ org-agenda-skip-scheduled-if-done t
+ org-agenda-start-on-weekday nil
+ org-reverse-note-order t
+ org-hide-leading-stars t
+ org-tags-column 64
+ )
+ (setq my-org-agenda-todo-file "~/.gtd/TODO.org")
+ (setq my-org-agenda-note-file "~/.gtd/NOTE.org")
+ (setq org-agenda-files `(,my-org-agenda-todo-file ,my-org-agenda-note-file))
+ (define-key global-map "\C-ca" 'org-agenda)
+ (define-key global-map "\C-ct" (lambda nil (interactive) (find-file my-org-agenda-note-file)))
- (when
- (or (featurep 'remember) (fboundp 'remember))
- (progn
- (setq remember-annotation-functions '(org-remember-annotation))
- (setq remember-handler-functions '(org-remember-handler))
- (add-hook 'remember-mode-hook 'org-remember-apply-template)
- (define-key global-map "\C-cr" 'org-remember)
- (setq org-remember-templates
- ;; With one item org-mode do not prompt choose template.
- `(
- ("todo" ?t "* TODO %?" ,my-org-agenda-todo-file)
- ;; ("note" ?n "* %?\n" ,my-org-agenda-note-file)
- ))
- (setq org-remember-store-without-prompt t)
- (org-remember-insinuate)
- ))
+ (when (or (featurep 'remember) (fboundp 'remember))
+ (setq remember-annotation-functions '(org-remember-annotation))
+ (setq remember-handler-functions '(org-remember-handler))
+ (add-hook 'remember-mode-hook 'org-remember-apply-template)
+ (define-key global-map "\C-cr" 'org-remember)
+ (setq org-remember-templates
+ ;; With one item org-mode do not prompt choose template.
+ `(
+ ("todo" ?t "* TODO %?" ,my-org-agenda-todo-file)
+ ;; ("note" ?n "* %?\n" ,my-org-agenda-note-file)
+ ))
+ (setq org-remember-store-without-prompt t)
+ (org-remember-insinuate)
+ )
- ;; (setq org-todo-keyword-faces
- ;; '(("TODO" . (:foreground "red" :weight bold))
- ;; ("WAIT" . (:foreground "orange" :weight bold))
- ;; ("DONE" . (:foreground "green" :weight bold))) )
- ))
+ ;; (setq org-todo-keyword-faces
+ ;; '(("TODO" . (:foreground "red" :weight bold))
+ ;; ("WAIT" . (:foreground "orange" :weight bold))
+ ;; ("DONE" . (:foreground "green" :weight bold))) )
+ )
;;; ----------------------------------------------------------------
(message "TODO, XXX, FIXME highlight")
@@ -1077,39 +1066,36 @@
;;; ----------------------------------------------------------------
(message "VCS, version control, cvs, svn, mercurial, hg, bazaar, bzr, git, fossil")
-(if (equal window-system 'w32)
- (progn
- (modify-coding-system-alist 'process "cvs" '(cp1251-dos . cp1251-dos))
- (modify-coding-system-alist 'process "svn" '(cp1251 . cp1251))
- (setq vc-svn-checkin-switches '("--encoding" "UTF-8"))
- ))
+(when (equal window-system 'w32)
+ (modify-coding-system-alist 'process "cvs" '(cp1251-dos . cp1251-dos))
+ (modify-coding-system-alist 'process "svn" '(cp1251 . cp1251))
+ (setq vc-svn-checkin-switches '("--encoding" "UTF-8"))
+ )
-(if window-system
- (progn
- (setq
- vc-annotate-very-old-color "#0b5b20"
- vc-annotate-background "white"
- vc-annotate-color-map
- '(
- (20 . "#EE0000")
- (40 . "#E0800D")
- (60 . "#D3001A")
- (80 . "#C68027")
- (100 . "#B90034")
- (120 . "#AB8042")
- (140 . "#9E004F")
- (160 . "#91805C")
- (180 . "#840069")
- (200 . "#778077")
- (220 . "#690084")
- (240 . "#5C8091")
- (260 . "#4F009E")
- (280 . "#4280AB")
- (300 . "#3400B9")
- (320 . "#2780C6")
- (340 . "#1A00D3")
- (360 . "#0D80E0")))
- )
+(when window-system
+ (setq
+ vc-annotate-very-old-color "#0b5b20"
+ vc-annotate-background "white"
+ vc-annotate-color-map
+ '(
+ (20 . "#EE0000")
+ (40 . "#E0800D")
+ (60 . "#D3001A")
+ (80 . "#C68027")
+ (100 . "#B90034")
+ (120 . "#AB8042")
+ (140 . "#9E004F")
+ (160 . "#91805C")
+ (180 . "#840069")
+ (200 . "#778077")
+ (220 . "#690084")
+ (240 . "#5C8091")
+ (260 . "#4F009E")
+ (280 . "#4280AB")
+ (300 . "#3400B9")
+ (320 . "#2780C6")
+ (340 . "#1A00D3")
+ (360 . "#0D80E0")))
)
;;; ----------------------------------------------------------------