Remove support for Emacs 21.x.
--- a/.emacs-my Fri Apr 01 18:01:57 2016 +0300
+++ b/.emacs-my Fri Apr 01 18:21:16 2016 +0300
@@ -324,6 +324,7 @@
(my-maximize) ))
(menu-bar-mode -1)
+(tooltip-mode -1)
(when window-system
(mouse-avoidance-mode 'animate)
(scroll-bar-mode 1)
@@ -334,13 +335,10 @@
(interactive)
(mouse-popup-menubar
(list (list (/ (display-pixel-width) 2) 10) (get-buffer-window (buffer-name)))
- nil)
- )
+ nil) )
(global-set-key [f10] 'my-popup-menu)
(global-set-key [apps] 'my-popup-menu)
- (global-set-key [menu] 'my-popup-menu)
- (when (>= emacs-major-version 22) (tooltip-mode -1))
- )
+ (global-set-key [menu] 'my-popup-menu) )
;; Prefer horizontal windows splitting.
(when (>= emacs-major-version 23)
@@ -410,7 +408,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "silent runing")
-;; (setq inhibit-splash-screen t) ; nonexist on 21.4.1
+(setq inhibit-splash-screen t)
(setq inhibit-startup-message t)
(setq initial-scratch-message nil)
@@ -691,8 +689,7 @@
;; Set margin only for desired modes! Do not frustrate calendar any more.
(make-variable-buffer-local 'scroll-margin)
(mapc (lambda (hook) (add-hook hook (lambda nil (setq scroll-margin my-scroll-margin))))
- ;; TODO its good invoke delete-dups for list, but delete-dups not exist in Emacs 21.4
- (append my-text-mode-hook-list my-devel-mode-hook-list my-scroll-margin-mode-hook-list) )
+ (delete-dups (append my-text-mode-hook-list my-devel-mode-hook-list my-scroll-margin-mode-hook-list)) )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "chars, unicode")
@@ -790,18 +787,13 @@
(require 'pc-select)
(setq pc-select-selection-keys-only t) ; To avoid some key bindings as F6, etc.
(setq pc-select-meta-moves-sexps t)
- (cond
- ((= emacs-major-version 21) (pc-selection-mode))
- ((>= emacs-major-version 22) (pc-selection-mode 1))
- )
- )
+ (pc-selection-mode 1) )
(when window-system
(set-face-attribute 'region nil :background "light blue"))
(when (eq window-system 'x)
- (setq x-select-enable-clipboard t) ; for Emacs 21.2.1 and newer
- )
+ (setq x-select-enable-clipboard t))
(when (fboundp 'er/expand-region)
(global-set-key (kbd "C-=") 'er/expand-region))
@@ -835,13 +827,7 @@
;; cyrillic-jis-russian for 567 is :,.
;; cyrillic-jcuken for SHIFT 567 is :,.
;; russian-computer for SHIFT 567 is %^&
-(setq my-russian-input-method 'russian-computer)
-(setq my-ukranian-input-method 'ukrainian-computer)
-(setq my-ipa-input-method 'ipa-x-sampa)
-(when (<= emacs-major-version 21)
- (setq my-russian-input-method 'cyrillic-jcuken)
- (setq my-ukranian-input-method 'cyrillic-jcuken))
-(setq default-input-method my-russian-input-method)
+(setq default-input-method 'russian-computer)
(defun my-toggle-input-method (&optional arg)
(interactive "P")
@@ -850,13 +836,13 @@
((eq arg 1)
(activate-input-method nil))
((eq arg 2)
- (activate-input-method my-russian-input-method))
+ (activate-input-method 'russian-computer))
((eq arg 3)
- (activate-input-method my-ukranian-input-method))
+ (activate-input-method 'ukrainian-computer))
((eq arg 4)
(activate-input-method 'greek))
((eq arg 5)
- (activate-input-method my-ipa-input-method))
+ (activate-input-method 'ipa-x-sampa))
((eq arg 6)
(activate-input-method 'TeX)) )
(toggle-input-method arg)) )
@@ -1140,10 +1126,8 @@
(define-key dired-mode-map (kbd "RET") 'my-dired-enter-to-dir)
)
-(when (>= emacs-major-version 22)
- ;; Enable 'a' command.
- (put 'dired-find-alternate-file 'disabled nil)
- )
+;; Enable 'a' command.
+(put 'dired-find-alternate-file 'disabled nil)
(defvar my--file-name-tmp-refex
(concat
@@ -2299,9 +2283,7 @@
(save-excursion
(re-search-forward "\\_<class\\_>" nil t))))
-(when (>= emacs-major-version 22)
- (add-to-list 'magic-mode-alist '(my--c++-header-file-p . c++-mode))
- )
+(add-to-list 'magic-mode-alist '(my--c++-header-file-p . c++-mode))
(setq-default comment-style (quote indent))
(setq-default comment-column 44)
@@ -3399,9 +3381,10 @@
(setq delete-auto-save-files t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "desktop")
+
;; Save and restore my buffers every time.
-
-(eval-when 'compile (require 'desktop))
+(require 'desktop)
(setq desktop-base-file-name ".emacs.desktop")
(setq desktop-base-lock-name ".emacs.desktop.lock")
@@ -3411,28 +3394,25 @@
)
(setq desktop-dirname user-emacs-directory)
-(when (>= emacs-major-version 22)
- (require 'desktop)
- (add-to-list 'desktop-path desktop-dirname)
- (setq desktop-restore-frames nil)
- (desktop-save-mode 1)
- (setq
- desktop-globals-to-save
- (append
- '((file-name-history . 100)
- (compile-history . 100)
- (command-history . 100)
- (extended-command-history . 100)
- (shell-command-history . 100)
- (search-ring . 20)
- (query-replace-history . 100)
- (regexp-history . 100)
- (grep-history . 100)
- (minibuffer-history . 100)
- tags-file-name
- register-alist)
- desktop-globals-to-save))
- )
+(add-to-list 'desktop-path desktop-dirname)
+(setq desktop-restore-frames nil)
+(desktop-save-mode 1)
+(setq
+ desktop-globals-to-save
+ (append
+ '((file-name-history . 100)
+ (compile-history . 100)
+ (command-history . 100)
+ (extended-command-history . 100)
+ (shell-command-history . 100)
+ (search-ring . 20)
+ (query-replace-history . 100)
+ (regexp-history . 100)
+ (grep-history . 100)
+ (minibuffer-history . 100)
+ tags-file-name
+ register-alist)
+ desktop-globals-to-save))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "User welcome msg")
--- a/.emacs-obsolete Fri Apr 01 18:01:57 2016 +0300
+++ b/.emacs-obsolete Fri Apr 01 18:21:16 2016 +0300
@@ -122,3 +122,80 @@
(setq org-remember-store-without-prompt t)
(org-remember-insinuate)
))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "highlight selected text")
+
+(cond
+ ((= emacs-major-version 21) (pc-selection-mode))
+ ((>= emacs-major-version 22) (pc-selection-mode 1)) )
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "keyboard, mouse")
+
+(setq my-russian-input-method 'russian-computer)
+(setq my-ukranian-input-method 'ukrainian-computer)
+(setq my-ipa-input-method 'ipa-x-sampa)
+(when (<= emacs-major-version 21)
+ (setq my-russian-input-method 'cyrillic-jcuken)
+ (setq my-ukranian-input-method 'cyrillic-jcuken))
+(setq default-input-method my-russian-input-method)
+
+(defun my-toggle-input-method (&optional arg)
+ (interactive "P")
+ (if (numberp arg)
+ (cond
+ ((eq arg 1)
+ (activate-input-method nil))
+ ((eq arg 2)
+ (activate-input-method 'my-russian-input-method))
+ ((eq arg 3)
+ (activate-input-method 'my-ukranian-input-method))
+ ((eq arg 4)
+ (activate-input-method 'greek))
+ ((eq arg 5)
+ (activate-input-method 'my-ipa-input-method))
+ ((eq arg 6)
+ (activate-input-method 'TeX)) )
+ (toggle-input-method arg)) )
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "dired")
+
+(when (>= emacs-major-version 22)
+ ;; Enable 'a' command.
+ (put 'dired-find-alternate-file 'disabled nil)
+ )
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "devel, programming")
+
+(when (>= emacs-major-version 22)
+ (add-to-list 'magic-mode-alist '(my--c++-header-file-p . c++-mode))
+ )
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "desktop")
+
+(when (>= emacs-major-version 22)
+ (require 'desktop)
+ (add-to-list 'desktop-path desktop-dirname)
+ (setq desktop-restore-frames nil)
+ (desktop-save-mode 1)
+ (setq
+ desktop-globals-to-save
+ (append
+ '((file-name-history . 100)
+ (compile-history . 100)
+ (command-history . 100)
+ (extended-command-history . 100)
+ (shell-command-history . 100)
+ (search-ring . 20)
+ (query-replace-history . 100)
+ (regexp-history . 100)
+ (grep-history . 100)
+ (minibuffer-history . 100)
+ tags-file-name
+ register-alist)
+ desktop-globals-to-save))
+ )