1 ;; -*- mode: emacs-lisp; mode: outline-minor; coding: utf-8; fill-column: 78 -*- |
1 ;; -*- mode: emacs-lisp; coding: utf-8; fill-column: 78 -*- |
2 ;; |
2 ;; |
3 ;; Written by Oleksandr Gavenko <gavenkoa@gmail.com>, 2008-2010. |
3 ;; Written by Oleksandr Gavenko <gavenkoa@gmail.com>, 2008-2010. |
4 ;; |
4 ;; |
5 ;; This file formed from parts and ideas from many sites/docs and |
5 ;; This file formed from parts and ideas from many sites/docs and |
6 ;; placed in public domain. |
6 ;; placed in public domain. |
7 ;; |
7 ;; |
8 ;; Config file for GNU Emacs. |
8 ;; Config file for GNU Emacs. |
9 ;; |
9 ;; |
10 ;; For load order see README. |
10 ;; For load order see README. |
11 |
11 |
12 ;;; ---------------------------------------------------------------- |
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
13 (message "recentf") |
13 (message "recentf") |
14 |
14 |
15 (require 'recentf) |
15 (require 'recentf) |
16 ;; Prevent TRAMP to login on remote host when loading. |
16 ;; Prevent TRAMP to login on remote host when loading. |
17 ;; Its take time and ask passwords! |
17 ;; Its take time and ask passwords! |
18 (setq recentf-auto-cleanup 'never) |
18 (setq recentf-auto-cleanup 'never) |
19 (recentf-mode t) |
19 (recentf-mode t) |
20 (setq recentf-max-saved-items 1000) |
20 (setq recentf-max-saved-items 1000) |
21 (global-set-key (kbd "\e\eq") 'recentf-open-files) |
21 (global-set-key (kbd "\e\eq") 'recentf-open-files) |
22 |
22 |
23 ;;; ---------------------------------------------------------------- |
23 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
24 (message "revert buffer") |
24 (message "revert buffer") |
25 |
25 |
26 (global-set-key [f5] 'revert-buffer) |
26 (global-set-key [f5] 'revert-buffer) |
27 (setq revert-without-query (quote (".*"))) |
27 (setq revert-without-query (quote (".*"))) |
28 (setq auto-revert-interval 2) |
28 (setq auto-revert-interval 2) |
29 |
29 |
30 ;;; ---------------------------------------------------------------- |
30 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
31 (message "debugging") |
31 (message "debugging") |
32 |
32 |
33 ;; Shut off message buffer by setting nil. |
33 ;; Shut off message buffer by setting nil. |
34 (setq message-log-max 512) |
34 (setq message-log-max 512) |
35 |
35 |
42 |
42 |
43 ;; Prevent Emacs from loading 'default.el', which loaded after '.emacs'. |
43 ;; Prevent Emacs from loading 'default.el', which loaded after '.emacs'. |
44 ;; Also '-q' prevent loading your init file. |
44 ;; Also '-q' prevent loading your init file. |
45 (setq inhibit-default-init nil) ; t/nil |
45 (setq inhibit-default-init nil) ; t/nil |
46 |
46 |
47 ;;; ---------------------------------------------------------------- |
47 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
48 (message "user info") |
48 (message "user info") |
49 |
49 |
50 (setq user-full-name "Oleksandr Gavenko") |
50 (setq user-full-name "Oleksandr Gavenko") |
51 (setq user-mail-address "gavenkoa@gmail.com") |
51 (setq user-mail-address "gavenkoa@gmail.com") |
52 (setq user-nick "gavenkoa") |
52 (setq user-nick "gavenkoa") |
53 (setenv "ORGANIZATION" (concat user-full-name " <" user-mail-address ">")) |
53 (setenv "ORGANIZATION" (concat user-full-name " <" user-mail-address ">")) |
54 |
54 |
55 ;;; ---------------------------------------------------------------- |
55 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
56 (message "my defun, defmacro, defvar") |
56 (message "my defun, defmacro, defvar") |
57 |
57 |
58 (defmacro my-filter (condfunc list) |
58 (defmacro my-filter (condfunc list) |
59 "Construct list with elements from LIST which satisfy CONDFUNC." |
59 "Construct list with elements from LIST which satisfy CONDFUNC." |
60 `(let (r) |
60 `(let (r) |
431 (make-variable-buffer-local 'scroll-margin) |
431 (make-variable-buffer-local 'scroll-margin) |
432 (mapc (lambda (hook) (add-hook hook (lambda nil (setq scroll-margin my-scroll-margin)))) |
432 (mapc (lambda (hook) (add-hook hook (lambda nil (setq scroll-margin my-scroll-margin)))) |
433 ;; TODO its good invoke delete-dups for list, but delete-dups not exist in Emacs 21.4 |
433 ;; TODO its good invoke delete-dups for list, but delete-dups not exist in Emacs 21.4 |
434 (append my-text-mode-hook-list my-devel-mode-hook-list my-scroll-margin-mode-hook-list) ) |
434 (append my-text-mode-hook-list my-devel-mode-hook-list my-scroll-margin-mode-hook-list) ) |
435 |
435 |
436 ;;; ---------------------------------------------------------------- |
436 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
437 (message "search, isearch, occur") |
437 (message "search, isearch, occur") |
438 |
438 |
439 (setq case-fold-search t) |
439 (setq case-fold-search t) |
440 |
440 |
441 (setq query-replace-highlight t) ; highlight during query |
441 (setq query-replace-highlight t) ; highlight during query |
445 (when (< emacs-major-version 23) |
445 (when (< emacs-major-version 23) |
446 (global-set-key (kbd "M-s o") 'occur) |
446 (global-set-key (kbd "M-s o") 'occur) |
447 ) |
447 ) |
448 (global-set-key [f7] 'occur) |
448 (global-set-key [f7] 'occur) |
449 |
449 |
450 ;;; ---------------------------------------------------------------- |
450 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
451 (message "grep, find") |
451 (message "grep, find") |
452 |
452 |
453 ;; -ls produce very noisy output: |
453 ;; -ls produce very noisy output: |
454 ;; (setq find-ls-option '("-ls" . "")) |
454 ;; (setq find-ls-option '("-ls" . "")) |
455 ;; So I use next expression, which work with GNU find, I replace %s with '0' |
455 ;; So I use next expression, which work with GNU find, I replace %s with '0' |
472 ) |
472 ) |
473 )) |
473 )) |
474 |
474 |
475 (global-set-key [M-f7] 'rgrep) |
475 (global-set-key [M-f7] 'rgrep) |
476 |
476 |
477 ;;; ---------------------------------------------------------------- |
477 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
478 (message "syntax highlighting") |
478 (message "syntax highlighting") |
479 |
479 |
480 (setq font-lock-maximum-decoration t) |
480 (setq font-lock-maximum-decoration t) |
481 (global-font-lock-mode 1) |
481 (global-font-lock-mode 1) |
482 |
482 |
483 ;;; ---------------------------------------------------------------- |
483 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
484 (message "highlight selected text") |
484 (message "highlight selected text") |
485 |
485 |
486 ;; 1/-1, when the mark is active, the region is highlighted. |
486 ;; 1/-1, when the mark is active, the region is highlighted. |
487 (transient-mark-mode 1) |
487 (transient-mark-mode 1) |
488 (delete-selection-mode 1) ; 1/-1 |
488 (delete-selection-mode 1) ; 1/-1 |
498 |
498 |
499 (when (eq window-system 'x) |
499 (when (eq window-system 'x) |
500 (setq x-select-enable-clipboard t) ; for Emacs 21.2.1 and newer |
500 (setq x-select-enable-clipboard t) ; for Emacs 21.2.1 and newer |
501 ) |
501 ) |
502 |
502 |
503 ;;; ---------------------------------------------------------------- |
503 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
504 (message "highlighting current line") |
504 (message "highlighting current line") |
505 |
505 |
506 (when window-system |
506 (when window-system |
507 (custom-set-faces '(hl-line ((t (:inherit highlight :background "light yellow"))))) |
507 (custom-set-faces '(hl-line ((t (:inherit highlight :background "light yellow"))))) |
508 (global-hl-line-mode 1) |
508 (global-hl-line-mode 1) |
509 ) |
509 ) |
510 |
510 |
511 ;;; ---------------------------------------------------------------- |
511 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
512 (message "paren, braces") |
512 (message "paren, braces") |
513 |
513 |
514 (show-paren-mode 1) ; Parenthesis matching via highlighting. |
514 (show-paren-mode 1) ; Parenthesis matching via highlighting. |
515 (setq show-paren-style (quote parenthesis)) |
515 (setq show-paren-style (quote parenthesis)) |
516 |
516 |
517 ;;; ---------------------------------------------------------------- |
517 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
518 (message "keyboard, mouse") |
518 (message "keyboard, mouse") |
519 |
519 |
520 ;; cyrillic-jis-russian for 567 is :,. |
520 ;; cyrillic-jis-russian for 567 is :,. |
521 ;; cyrillic-jcuken for SHIFT 567 is :,. |
521 ;; cyrillic-jcuken for SHIFT 567 is :,. |
522 ;; russian-computer for SHIFT 567 is %^& |
522 ;; russian-computer for SHIFT 567 is %^& |
523 (if (>= emacs-major-version 22) |
523 (if (>= emacs-major-version 22) |
524 (setq default-input-method 'russian-computer) |
524 (setq default-input-method 'russian-computer) |
525 (setq default-input-method 'cyrillic-jcuken)) |
525 (setq default-input-method 'cyrillic-jcuken)) |
526 ;; (pc-bindings-mode) ; Myself define keybinding, see |
526 ;; (pc-bindings-mode) ; Myself define keybinding, see |
527 |
527 |
528 ;;; ---------------------------------------------------------------- |
528 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
529 (message "completion") |
529 (message "completion") |
530 |
530 |
531 ;; I remove partial-completion-mode because it depricated in Emacs 24.0. |
531 ;; I remove partial-completion-mode because it depricated in Emacs 24.0. |
532 ;; Completion controled by 'completion-styles' variable. |
532 ;; Completion controled by 'completion-styles' variable. |
533 |
533 |
534 ;;; ---------------------------------------------------------------- |
534 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
535 (message "mouse") |
535 (message "mouse") |
536 |
536 |
537 ;; Scroll Bar gets dragged by mouse butn 1 |
537 ;; Scroll Bar gets dragged by mouse butn 1 |
538 (global-set-key [vertical-scroll-bar down-mouse-1] 'scroll-bar-drag) |
538 (global-set-key [vertical-scroll-bar down-mouse-1] 'scroll-bar-drag) |
539 ;; Paste at point NOT at cursor |
539 ;; Paste at point NOT at cursor |
540 (setq mouse-yank-at-point t) |
540 (setq mouse-yank-at-point t) |
541 (when window-system |
541 (when window-system |
542 (mouse-wheel-mode 1) |
542 (mouse-wheel-mode 1) |
543 ) |
543 ) |
544 |
544 |
545 ;;; ---------------------------------------------------------------- |
545 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
546 (message "key binding, short-keys") |
546 (message "key binding, short-keys") |
547 |
547 |
548 (global-set-key [home] 'beginning-of-line) |
548 (global-set-key [home] 'beginning-of-line) |
549 (global-set-key [end] 'end-of-line) |
549 (global-set-key [end] 'end-of-line) |
550 (global-set-key [C-home] 'beginning-of-buffer) |
550 (global-set-key [C-home] 'beginning-of-buffer) |
723 (setq ls-lisp-format-time-list |
723 (setq ls-lisp-format-time-list |
724 '("%Y-%m-%d %H:%M:%S" |
724 '("%Y-%m-%d %H:%M:%S" |
725 "%Y-%m-%d %H:%M ")) |
725 "%Y-%m-%d %H:%M ")) |
726 (require 'ls-lisp) |
726 (require 'ls-lisp) |
727 |
727 |
728 ;;; ---------------------------------------------------------------- |
728 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
729 (message "compression, archive") |
729 (message "compression, archive") |
730 |
730 |
731 (require 'jka-compr) ; Automatic decompression, hooks for tar-mode. |
731 (require 'jka-compr) ; Automatic decompression, hooks for tar-mode. |
732 (when (fboundp 'auto-compression-mode) |
732 (when (fboundp 'auto-compression-mode) |
733 (auto-compression-mode 1)) |
733 (auto-compression-mode 1)) |
734 |
734 |
735 (modify-coding-system-alist 'file "\\.\\(war\\|ear\\|sar\\|egg\\)\\'" 'no-conversion) |
735 (modify-coding-system-alist 'file "\\.\\(war\\|ear\\|sar\\|egg\\)\\'" 'no-conversion) |
736 |
736 |
737 (add-to-list 'auto-mode-alist '("\\.\\(war\\|ear\\|sar\\|egg\\)\\'" . archive-mode)) |
737 (add-to-list 'auto-mode-alist '("\\.\\(war\\|ear\\|sar\\|egg\\)\\'" . archive-mode)) |
738 |
738 |
739 ;;; ---------------------------------------------------------------- |
739 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
740 (message "image, png, svg") |
740 (message "image, png, svg") |
741 |
741 |
742 (when (fboundp 'auto-image-file-mode) |
742 (when (fboundp 'auto-image-file-mode) |
743 (auto-image-file-mode 1)) |
743 (auto-image-file-mode 1)) |
744 (eval-after-load 'image-file |
744 (eval-after-load 'image-file |
763 ;; Place dir at end to appear at the start of completion-ignored-extensions. |
763 ;; Place dir at end to appear at the start of completion-ignored-extensions. |
764 "CVS/" ".hg/" ".svn/" ".git/" ".bzr/" |
764 "CVS/" ".hg/" ".svn/" ".git/" ".bzr/" |
765 ) ) |
765 ) ) |
766 (setq read-file-name-completion-ignore-case t) |
766 (setq read-file-name-completion-ignore-case t) |
767 |
767 |
768 ;;; ---------------------------------------------------------------- |
768 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
769 (message "music") |
769 (message "music") |
770 (setq gnus-audio-au-player "winamp.exe" |
770 (setq gnus-audio-au-player "winamp.exe" |
771 gnus-audio-directory "D:\\music" |
771 gnus-audio-directory "D:\\music" |
772 gnus-audio-wav-player "winamp.exe") |
772 gnus-audio-wav-player "winamp.exe") |
773 |
773 |
774 ;;; ---------------------------------------------------------------- |
774 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
775 (message "url") |
775 (message "url") |
776 |
776 |
777 ;; http://tools.ietf.org/html/rfc3986 |
777 ;; http://tools.ietf.org/html/rfc3986 |
778 ;; http://en.wikipedia.org/wiki/Percent-encoding |
778 ;; http://en.wikipedia.org/wiki/Percent-encoding |
779 (defun my-percent-decode (str) |
779 (defun my-percent-decode (str) |
813 "Search for Cygwin package on-line." |
813 "Search for Cygwin package on-line." |
814 (interactive (list (read-input "Search for Cygwin package on-line: "))) |
814 (interactive (list (read-input "Search for Cygwin package on-line: "))) |
815 (browse-url (format "http://cygwin.com/cgi-bin2/package-grep.cgi?grep=%s" str)) |
815 (browse-url (format "http://cygwin.com/cgi-bin2/package-grep.cgi?grep=%s" str)) |
816 ) |
816 ) |
817 |
817 |
818 ;;; ---------------------------------------------------------------- |
818 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
819 (message "calendar") |
819 (message "calendar") |
820 |
820 |
821 ;; (setq mark-holidays-in-calendar t) |
821 ;; (setq mark-holidays-in-calendar t) |
822 ;; (setq all-christian-calendar-holidays t) |
822 ;; (setq all-christian-calendar-holidays t) |
823 ;; (setq calendar-date-display-form (quote ((format "%04s-%02d-%02d" year (string-to-int month) (string-to-int day))))) |
823 ;; (setq calendar-date-display-form (quote ((format "%04s-%02d-%02d" year (string-to-int month) (string-to-int day))))) |
824 ;; (setq calendar-time-display-form (quote (24-hours ":" minutes (if time-zone " (") time-zone (if time-zone ")")))) |
824 ;; (setq calendar-time-display-form (quote (24-hours ":" minutes (if time-zone " (") time-zone (if time-zone ")")))) |
825 (setq calendar-week-start-day 1) |
825 (setq calendar-week-start-day 1) |
826 (setq european-calendar-style t) |
826 (setq european-calendar-style t) |
827 |
827 |
828 ;;; ---------------------------------------------------------------- |
828 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
829 (message "standard hooks") |
829 (message "standard hooks") |
830 |
830 |
831 (add-hook 'write-file-hooks 'time-stamp) |
831 (add-hook 'write-file-hooks 'time-stamp) |
832 |
832 |
833 ;;; ---------------------------------------------------------------- |
833 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
834 (message "auto-fill") |
834 (message "auto-fill") |
835 |
835 |
836 (setq-default fill-column 78) |
836 (setq-default fill-column 78) |
837 |
837 |
838 (defvar my-fill-column 100 |
838 (defvar my-fill-column 100 |
844 |
844 |
845 ;; Turn on auto-fill mode |
845 ;; Turn on auto-fill mode |
846 (add-hook 'html-mode-hook 'turn-on-auto-fill) |
846 (add-hook 'html-mode-hook 'turn-on-auto-fill) |
847 (add-hook 'text-mode-hook 'turn-on-auto-fill) |
847 (add-hook 'text-mode-hook 'turn-on-auto-fill) |
848 |
848 |
849 ;;; ---------------------------------------------------------------- |
849 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
850 (message "unknown") |
850 (message "unknown") |
851 |
851 |
852 ;; mailcrypt gnus message sendmail bbdb pilot bibtex eiffel-mode emacs-w3m |
852 ;; mailcrypt gnus message sendmail bbdb pilot bibtex eiffel-mode emacs-w3m |
853 ;; eudc filladapt hugs-mode mpg123 php-mode ps-print |
853 ;; eudc filladapt hugs-mode mpg123 php-mode ps-print |
854 ;; chord-mode - edit guitar music |
854 ;; chord-mode - edit guitar music |
855 ;; discography - variant of BibTeX mode for discographies |
855 ;; discography - variant of BibTeX mode for discographies |
856 |
856 |
857 ;;; ---------------------------------------------------------------- |
857 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
858 (message "cacl, calculator") |
858 (message "cacl, calculator") |
859 |
859 |
860 (setq-default calc-group-digits t) |
860 (setq-default calc-group-digits t) |
861 (setq-default calc-group-char "'") |
861 (setq-default calc-group-char "'") |
862 |
862 |
889 '(rst-level-4-face ((t (:background "yellow"))) t) |
889 '(rst-level-4-face ((t (:background "yellow"))) t) |
890 '(rst-level-5-face ((t (:background "yellow"))) t) |
890 '(rst-level-5-face ((t (:background "yellow"))) t) |
891 '(rst-level-6face ((t (:background "yellow"))) t) |
891 '(rst-level-6face ((t (:background "yellow"))) t) |
892 ) ) ) ) |
892 ) ) ) ) |
893 |
893 |
894 ;;; ---------------------------------------------------------------- |
894 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
895 (message "TeX, LaTeX") |
895 (message "TeX, LaTeX") |
896 |
896 |
897 (setq tex-run-command "initex") |
897 (setq tex-run-command "initex") |
898 |
898 |
899 ;;; ---------------------------------------------------------------- |
899 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
900 (message "AUC TeX") |
900 (message "AUC TeX") |
901 |
901 |
902 ;(add-hook 'LaTeX-mode-hook 'LaTeX-install-toolbar) |
902 ;(add-hook 'LaTeX-mode-hook 'LaTeX-install-toolbar) |
903 ;; (setq TeX-parse-self t) ; Enable parse on load. |
903 ;; (setq TeX-parse-self t) ; Enable parse on load. |
904 ;; (setq TeX-auto-save t) ; Enable parse on save. |
904 ;; (setq TeX-auto-save t) ; Enable parse on save. |
943 ;; (autoload 'reftex-citation "reftex-cite" "Make citation" nil) |
943 ;; (autoload 'reftex-citation "reftex-cite" "Make citation" nil) |
944 ;; (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t) |
944 ;; (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t) |
945 ;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode |
945 ;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode |
946 ;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode |
946 ;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode |
947 |
947 |
948 ;;; ---------------------------------------------------------------- |
948 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
949 (message "PreviewLatex") |
949 (message "PreviewLatex") |
950 |
950 |
951 ;(load "preview-latex.el" nil t t) |
951 ;(load "preview-latex.el" nil t t) |
952 |
952 |
953 ;(add-hook 'LaTeX-mode-hook #'LaTeX-preview-setup) |
953 ;(add-hook 'LaTeX-mode-hook #'LaTeX-preview-setup) |
954 ;(autoload 'LaTeX-preview-setup "preview") |
954 ;(autoload 'LaTeX-preview-setup "preview") |
955 |
955 |
956 ;;; ---------------------------------------------------------------- |
956 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
957 (message "Info") |
957 (message "Info") |
958 |
958 |
959 ;; Because of Debian policy documentation covered by FDL license with invariant sections not allowed in packet |
959 ;; Because of Debian policy documentation covered by FDL license with invariant sections not allowed in packet |
960 ;; repository tree. So it must be installed manually. My usual configuration is install user local software |
960 ;; repository tree. So it must be installed manually. My usual configuration is install user local software |
961 ;; into ~/usr DISTDIR. |
961 ;; into ~/usr DISTDIR. |
962 (unless (getenv "INFOPATH") |
962 (unless (getenv "INFOPATH") |
963 (setenv "INFOPATH" "~/usr/share/info:")) |
963 (setenv "INFOPATH" "~/usr/share/info:")) |
964 |
964 |
965 ;;; ---------------------------------------------------------------- |
965 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
966 (message "man, woman") |
966 (message "man, woman") |
967 |
967 |
968 (setq woman-use-own-frame nil) |
968 (setq woman-use-own-frame nil) |
969 (setq woman-fill-frame t) |
969 (setq woman-fill-frame t) |
970 |
970 |
971 ;;; ---------------------------------------------------------------- |
971 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
972 (message "comint") |
972 (message "comint") |
973 |
973 |
974 ;; If non-nil, add a `/' to completed directories, ` ' to file names. |
974 ;; If non-nil, add a `/' to completed directories, ` ' to file names. |
975 (setq comint-completion-addsuffix t) |
975 (setq comint-completion-addsuffix t) |
976 ;; Non-nil means go to the end of the line before sending input. |
976 ;; Non-nil means go to the end of the line before sending input. |
977 (setq comint-eol-on-send t) |
977 (setq comint-eol-on-send t) |
978 |
978 |
979 ;;; ---------------------------------------------------------------- |
979 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
980 (message "spell, ispell, aspell") |
980 (message "spell, ispell, aspell") |
981 |
981 |
982 ;; Settings for spelling done in '.emacs-autogen'. |
982 ;; Settings for spelling done in '.emacs-autogen'. |
983 ;(add-hook 'text-mode-hook 'flyspell-mode) |
983 ;(add-hook 'text-mode-hook 'flyspell-mode) |
984 ;(setq flyspell-default-dictionary "russianw") |
984 ;(setq flyspell-default-dictionary "russianw") |
985 ;(setq flyspell-delay '1) |
985 ;(setq flyspell-delay '1) |
986 |
986 |
987 ;;; ---------------------------------------------------------------- |
987 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
988 (message "dict, dictd, dictionary") |
988 (message "dict, dictd, dictionary") |
989 |
989 |
990 (when (fboundp 'dict-c5-mode) |
990 (when (fboundp 'dict-c5-mode) |
991 (add-to-list 'auto-mode-alist '("\\.dict-c5$" . dict-c5-mode)) |
991 (add-to-list 'auto-mode-alist '("\\.dict-c5$" . dict-c5-mode)) |
992 ) |
992 ) |
993 |
993 |
994 ;;; ---------------------------------------------------------------- |
994 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
995 (message "remember-mode") |
995 (message "remember-mode") |
996 |
996 |
997 (when (>= emacs-major-version 23) |
997 (when (>= emacs-major-version 23) |
998 (require 'remember)) |
998 (require 'remember)) |
999 |
999 |
1000 ;;; ---------------------------------------------------------------- |
1000 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1001 (message "org-mode, GTD, PIM, organize, todo") |
1001 (message "org-mode, GTD, PIM, organize, todo") |
1002 |
1002 |
1003 (when (>= emacs-major-version 22) |
1003 (when (>= emacs-major-version 22) |
1004 (require 'org)) |
1004 (require 'org)) |
1005 |
1005 |
1092 ;; 64 times, for highlight C-u C-u C-u <key> |
1092 ;; 64 times, for highlight C-u C-u C-u <key> |
1093 ("\\([^[:space:]]\\)\\1\\{63\\}" 0 'my-contrasty-face t) |
1093 ("\\([^[:space:]]\\)\\1\\{63\\}" 0 'my-contrasty-face t) |
1094 )) |
1094 )) |
1095 ) |
1095 ) |
1096 |
1096 |
1097 ;;; ---------------------------------------------------------------- |
1097 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1098 (message "fortune") |
1098 (message "fortune") |
1099 (setq fortune-file "~/XXX") |
1099 (setq fortune-file "~/XXX") |
1100 |
1100 |
1101 ;;; ---------------------------------------------------------------- |
1101 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1102 (message "mail, mh-e") |
1102 (message "mail, mh-e") |
1103 |
1103 |
1104 (setq mail-signature t) |
1104 (setq mail-signature t) |
1105 (setq mail-signature-file "~/.signature") |
1105 (setq mail-signature-file "~/.signature") |
1106 ;; (add-hook 'mail-setup-hook 'fortune-to-signature) |
1106 ;; (add-hook 'mail-setup-hook 'fortune-to-signature) |
1107 |
1107 |
1108 ;; (setq mail-user-agent 'mh-e-user-agent) |
1108 ;; (setq mail-user-agent 'mh-e-user-agent) |
1109 |
1109 |
1110 ;;; ---------------------------------------------------------------- |
1110 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1111 (message "jabber") |
1111 (message "jabber") |
1112 |
1112 |
1113 (autoload 'jabber-connect-all "jabber") |
1113 (autoload 'jabber-connect-all "jabber") |
1114 |
1114 |
1115 (setq |
1115 (setq |
1223 ;; Kill buffers for private queries after quitting the server |
1223 ;; Kill buffers for private queries after quitting the server |
1224 ;; (setq erc-kill-queries-on-quit t) |
1224 ;; (setq erc-kill-queries-on-quit t) |
1225 ;; Kill buffers for server messages after quitting the server |
1225 ;; Kill buffers for server messages after quitting the server |
1226 ;; (setq erc-kill-server-buffer-on-quit t) |
1226 ;; (setq erc-kill-server-buffer-on-quit t) |
1227 |
1227 |
1228 ;;; ---------------------------------------------------------------- |
1228 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1229 (message "vc-mode, VCS, version control, cvs, svn, mercurial, hg, bazaar, bzr, git, fossil") |
1229 (message "vc-mode, VCS, version control, cvs, svn, mercurial, hg, bazaar, bzr, git, fossil") |
1230 |
1230 |
1231 ;; `-b' switch to ignore changes in whitespaces. |
1231 ;; `-b' switch to ignore changes in whitespaces. |
1232 ;; (setq vc-git-diff-switches "-b") |
1232 ;; (setq vc-git-diff-switches "-b") |
1233 ;; (setq vc-diff-switches "-b") |
1233 ;; (setq vc-diff-switches "-b") |
1262 (320 . "#2780C6") |
1262 (320 . "#2780C6") |
1263 (340 . "#1A00D3") |
1263 (340 . "#1A00D3") |
1264 (360 . "#0D80E0"))) |
1264 (360 . "#0D80E0"))) |
1265 ) |
1265 ) |
1266 |
1266 |
1267 ;;; ---------------------------------------------------------------- |
1267 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1268 (message "psvn") |
1268 (message "psvn") |
1269 |
1269 |
1270 (setq svn-status-verbose t) |
1270 (setq svn-status-verbose t) |
1271 (setq svn-status-hide-unmodified t) |
1271 (setq svn-status-hide-unmodified t) |
1272 |
1272 |
1273 ;;; ---------------------------------------------------------------- |
1273 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1274 (message "DVC") |
1274 (message "DVC") |
1275 |
1275 |
1276 (when (featurep 'dvc-emacs) |
1276 (when (featurep 'dvc-emacs) |
1277 (setq dvc-tips-enabled nil) |
1277 (setq dvc-tips-enabled nil) |
1278 ) |
1278 ) |
1279 |
1279 |
1280 ;;; ---------------------------------------------------------------- |
1280 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1281 (message "devel, prog, programming") |
1281 (message "devel, prog, programming") |
1282 |
1282 |
1283 (which-func-mode 1) |
1283 (which-func-mode 1) |
1284 |
1284 |
1285 (add-to-list 'auto-mode-alist '("\\.cu$" . c-mode)) |
1285 (add-to-list 'auto-mode-alist '("\\.cu$" . c-mode)) |
1458 |
1458 |
1459 (require 'imenu) |
1459 (require 'imenu) |
1460 (mapc (lambda (hook) (add-hook hook 'my-imenu-to-menubar)) |
1460 (mapc (lambda (hook) (add-hook hook 'my-imenu-to-menubar)) |
1461 my-devel-mode-hook-list) |
1461 my-devel-mode-hook-list) |
1462 |
1462 |
1463 ;;; ---------------------------------------------------------------- |
1463 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1464 (message "windows inf files for driver installin") |
1464 (message "windows inf files for driver installin") |
1465 |
1465 |
1466 (add-to-list 'auto-mode-alist '("\\.inf\\'" . conf-mode)) |
1466 (add-to-list 'auto-mode-alist '("\\.inf\\'" . conf-mode)) |
1467 |
1467 |
1468 ;;; ---------------------------------------------------------------- |
1468 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1469 (message "makefile, make") |
1469 (message "makefile, make") |
1470 |
1470 |
1471 (add-to-list 'auto-mode-alist '("\\(Makefile\\|Makefile\\..+\\)\\'" . makefile-gmake-mode)) |
1471 (add-to-list 'auto-mode-alist '("\\(Makefile\\|Makefile\\..+\\)\\'" . makefile-gmake-mode)) |
1472 |
1472 |
1473 ;;; ---------------------------------------------------------------- |
1473 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1474 (message "asm, assembler") |
1474 (message "asm, assembler") |
1475 |
1475 |
1476 ;; (setq-default asm-comment-char 59) |
1476 ;; (setq-default asm-comment-char 59) |
1477 (add-hook 'asm-mode-hook '(lambda () (setq comment-start "/*") (setq comment-end "*/")) t) |
1477 (add-hook 'asm-mode-hook '(lambda () (setq comment-start "/*") (setq comment-end "*/")) t) |
1478 |
1478 |
1479 (add-to-list 'auto-mode-alist '("\\.\\([sS]79\\|[sS]\\)\\'" . asm-mode)) |
1479 (add-to-list 'auto-mode-alist '("\\.\\([sS]79\\|[sS]\\)\\'" . asm-mode)) |
1480 |
1480 |
1481 ;; (add-hook 'asm-mode-hook '(lambda () (local-unset-key ":"))) |
1481 ;; (add-hook 'asm-mode-hook '(lambda () (local-unset-key ":"))) |
1482 ;; (add-hook 'asm-mode-hook '(lambda () (local-set-key ":" ":"))) |
1482 ;; (add-hook 'asm-mode-hook '(lambda () (local-set-key ":" ":"))) |
1483 |
1483 |
1484 ;;; ---------------------------------------------------------------- |
1484 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1485 (message "linker") |
1485 (message "linker") |
1486 |
1486 |
1487 (when (fboundp 'iar-linker-config-mode) |
1487 (when (fboundp 'iar-linker-config-mode) |
1488 (add-to-list 'auto-mode-alist '("\\.icf\\'" . iar-linker-config-mode)) |
1488 (add-to-list 'auto-mode-alist '("\\.icf\\'" . iar-linker-config-mode)) |
1489 ) |
1489 ) |
1490 (when (fboundp 'iar4-linker-config-mode) |
1490 (when (fboundp 'iar4-linker-config-mode) |
1491 (add-to-list 'auto-mode-alist '("\\.xcl\\'" . iar4-linker-config-mode)) |
1491 (add-to-list 'auto-mode-alist '("\\.xcl\\'" . iar4-linker-config-mode)) |
1492 ) |
1492 ) |
1493 |
1493 |
1494 ;;; ---------------------------------------------------------------- |
1494 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1495 (message "lisp, elisp") |
1495 (message "lisp, elisp") |
1496 |
1496 |
1497 (setq list-command-history-max 256) |
1497 (setq list-command-history-max 256) |
1498 |
1498 |
1499 (add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode) |
1499 (add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode) |
1592 (other . "my") |
1592 (other . "my") |
1593 )) |
1593 )) |
1594 ) |
1594 ) |
1595 (add-hook 'c-mode-common-hook 'my-c-mode-style-hook) |
1595 (add-hook 'c-mode-common-hook 'my-c-mode-style-hook) |
1596 |
1596 |
1597 ;;; ---------------------------------------------------------------- |
1597 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1598 (message "python") |
1598 (message "python") |
1599 |
1599 |
1600 (when (equal window-system 'w32) |
1600 (when (equal window-system 'w32) |
1601 (add-to-list 'process-coding-system-alist '("python" cp1251-unix . cp1251-unix)) |
1601 (add-to-list 'process-coding-system-alist '("python" cp1251-unix . cp1251-unix)) |
1602 ) |
1602 ) |
1603 |
1603 |
1604 ;;; ---------------------------------------------------------------- |
1604 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1605 (message "javascript, js") |
1605 (message "javascript, js") |
1606 |
1606 |
1607 ;; (if (>= emacs-major-version 23) |
1607 ;; (if (>= emacs-major-version 23) |
1608 ;; (add-to-list 'auto-mode-alist '("\\.js$" . js-mode)) |
1608 ;; (add-to-list 'auto-mode-alist '("\\.js$" . js-mode)) |
1609 ;; (add-to-list 'auto-mode-alist '("\\.js$" . javascript-generic-mode)) |
1609 ;; (add-to-list 'auto-mode-alist '("\\.js$" . javascript-generic-mode)) |
1610 ;; ) |
1610 ;; ) |
1611 |
1611 |
1612 (setq auto-mode-alist (rassq-delete-all 'js-mode auto-mode-alist)) |
1612 (setq auto-mode-alist (rassq-delete-all 'js-mode auto-mode-alist)) |
1613 (add-to-list 'auto-mode-alist '("\\.js$" . c++-mode)) |
1613 (add-to-list 'auto-mode-alist '("\\.js$" . c++-mode)) |
1614 |
1614 |
1615 ;;; ---------------------------------------------------------------- |
1615 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1616 (message "bat file, batch") |
1616 (message "bat file, batch") |
1617 |
1617 |
1618 ;; loaded from 'generic-x.el' |
1618 ;; loaded from 'generic-x.el' |
1619 |
1619 |
1620 ;;; ---------------------------------------------------------------- |
1620 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1621 (message "nsis-mode") |
1621 (message "nsis-mode") |
1622 |
1622 |
1623 (when (fboundp 'nsis-mode) |
1623 (when (fboundp 'nsis-mode) |
1624 (add-to-list 'auto-mode-alist '("\\.\\(nsi\\|nsh\\)\\'" . nsis-mode)) |
1624 (add-to-list 'auto-mode-alist '("\\.\\(nsi\\|nsh\\)\\'" . nsis-mode)) |
1625 ) |
1625 ) |
1626 |
1626 |
1627 ;;; ---------------------------------------------------------------- |
1627 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1628 (message "csharp, c-sharp") |
1628 (message "csharp, c-sharp") |
1629 |
1629 |
1630 (autoload 'csharp-mode "csharp-mode" "Major mode for editing C# code." t) |
1630 (autoload 'csharp-mode "csharp-mode" "Major mode for editing C# code." t) |
1631 (add-to-list 'auto-mode-alist '("\\.cs$" . csharp-mode)) |
1631 (add-to-list 'auto-mode-alist '("\\.cs$" . csharp-mode)) |
1632 |
1632 |
1633 ;;; ---------------------------------------------------------------- |
1633 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1634 (message "java") |
1634 (message "java") |
1635 |
1635 |
1636 ;;; ---------------------------------------------------------------- |
1636 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1637 (message "ECB") |
1637 (message "ECB") |
1638 |
1638 |
1639 (setq ecb-tip-of-the-day nil) |
1639 (setq ecb-tip-of-the-day nil) |
1640 |
1640 |
1641 ;;; ---------------------------------------------------------------- |
1641 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1642 (message "html") |
1642 (message "html") |
1643 |
1643 |
1644 (defun html-charref-escape-region (start end) |
1644 (defun html-charref-escape-region (start end) |
1645 (interactive "r") |
1645 (interactive "r") |
1646 (save-excursion |
1646 (save-excursion |
1691 (goto-char begin) |
1691 (goto-char begin) |
1692 (insert (html-charref-to-string (delete-and-extract-region begin end)))) |
1692 (insert (html-charref-to-string (delete-and-extract-region begin end)))) |
1693 (html-charref-to-string (buffer-substring begin end)) |
1693 (html-charref-to-string (buffer-substring begin end)) |
1694 )) |
1694 )) |
1695 |
1695 |
1696 ;;; ---------------------------------------------------------------- |
1696 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1697 (message "nxml") |
1697 (message "nxml") |
1698 |
1698 |
1699 (setq nxml-sexp-element-flag t) |
1699 (setq nxml-sexp-element-flag t) |
1700 (setq nxml-child-indent 2) |
1700 (setq nxml-child-indent 2) |
1701 (setq nxml-attribute-indent 4) |
1701 (setq nxml-attribute-indent 4) |
1702 |
1702 |
1703 (eval-after-load 'rng-loc |
1703 (eval-after-load 'rng-loc |
1704 '(add-to-list 'rng-schema-locating-files "~/.emacs.d/rnc/schemas.xml") |
1704 '(add-to-list 'rng-schema-locating-files "~/.emacs.d/rnc/schemas.xml") |
1705 ) |
1705 ) |
1706 |
1706 |
1707 ;;; ---------------------------------------------------------------- |
1707 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1708 (message "psgml") |
1708 (message "psgml") |
1709 |
1709 |
1710 (setq my-html-template |
1710 (setq my-html-template |
1711 '("html" |
1711 '("html" |
1712 (nil |
1712 (nil |
1732 (my-filter |
1732 (my-filter |
1733 (lambda (item) (not (equal (car item) "html"))) |
1733 (lambda (item) (not (equal (car item) "html"))) |
1734 html-tag-alist))) |
1734 html-tag-alist))) |
1735 ))) |
1735 ))) |
1736 |
1736 |
1737 ;;; ---------------------------------------------------------------- |
1737 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1738 (message "sh, bash") |
1738 (message "sh, bash") |
1739 |
1739 |
1740 (add-to-list 'auto-mode-alist '("\\.cygport\\'" . shell-script-mode)) |
1740 (add-to-list 'auto-mode-alist '("\\.cygport\\'" . shell-script-mode)) |
1741 |
1741 |
1742 ;;; ---------------------------------------------------------------- |
1742 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1743 (message "printing") |
1743 (message "printing") |
1744 |
1744 |
1745 ;; Use Notepad to print plain text files to the default Windows printer |
1745 ;; Use Notepad to print plain text files to the default Windows printer |
1746 ;(setq lpr-command "notepad") |
1746 ;(setq lpr-command "notepad") |
1747 ;(setq lpr-headers-switches '("/p")) ; \ mis-use these |
1747 ;(setq lpr-headers-switches '("/p")) ; \ mis-use these |
1772 delete-old-versions t ; delete excess backup versions silently |
1772 delete-old-versions t ; delete excess backup versions silently |
1773 kept-old-versions 1 ; store first original version |
1773 kept-old-versions 1 ; store first original version |
1774 kept-new-versions 3 ; store last 3 version |
1774 kept-new-versions 3 ; store last 3 version |
1775 version-control t) ; use versioned backups |
1775 version-control t) ; use versioned backups |
1776 |
1776 |
1777 ;;; ---------------------------------------------------------------- |
1777 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1778 (message "auto save") |
1778 (message "auto save") |
1779 |
1779 |
1780 (setq auto-save-default t) |
1780 (setq auto-save-default t) |
1781 ;; If nil autosave to different than original to buffer file. |
1781 ;; If nil autosave to different than original to buffer file. |
1782 (setq auto-save-visited-file-name nil) |
1782 (setq auto-save-visited-file-name nil) |
1783 (setq auto-save-interval 300) |
1783 (setq auto-save-interval 300) |
1784 ;; Note: if you kill unsaved file auto save file not deleted. |
1784 ;; Note: if you kill unsaved file auto save file not deleted. |
1785 (setq delete-auto-save-files t) |
1785 (setq delete-auto-save-files t) |
1786 |
1786 |
1787 ;;; ---------------------------------------------------------------- |
1787 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1788 ;; Save and restore my buffers every time. |
1788 ;; Save and restore my buffers every time. |
1789 (setq desktop-dirname "~/.emacs.d") |
1789 (setq desktop-dirname "~/.emacs.d") |
1790 (when (>= emacs-major-version 22) |
1790 (when (>= emacs-major-version 22) |
1791 (desktop-save-mode 1) |
1791 (desktop-save-mode 1) |
1792 ) |
1792 ) |
1793 |
1793 |
1794 ;;; ---------------------------------------------------------------- |
1794 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1795 (message "User welcome msg") |
1795 (message "User welcome msg") |
1796 |
1796 |
1797 (add-hook 'emacs-startup-hook |
1797 (add-hook 'emacs-startup-hook |
1798 (lambda () |
1798 (lambda () |
1799 (let ( (mgs-list '("Welcome to emacs, the thermonuclear editor." |
1799 (let ( (mgs-list '("Welcome to emacs, the thermonuclear editor." |