.emacs-my
changeset 206 346d6d346f88
parent 201 8531f8af6528
parent 205 9460f6ad163d
child 207 9c5a1d6f19c8
equal deleted inserted replaced
201:8531f8af6528 206:346d6d346f88
   417 ;; Turn on auto-fill mode
   417 ;; Turn on auto-fill mode
   418 (add-hook 'html-mode-hook 'turn-on-auto-fill)
   418 (add-hook 'html-mode-hook 'turn-on-auto-fill)
   419 (add-hook 'text-mode-hook 'turn-on-auto-fill)
   419 (add-hook 'text-mode-hook 'turn-on-auto-fill)
   420 
   420 
   421 ;; ----------------------------------------------------------------------
   421 ;; ----------------------------------------------------------------------
   422 ;; DESIRE
   422 ;; unknown
   423 
   423 
   424 ;; (require 'desire)
   424 ;; (require 'desire)
   425 
       
   426 ;; (add-to-list 'desire-load-path
   425 ;; (add-to-list 'desire-load-path
   427 ;;       (expand-file-name "~/share/emacs/desire"))
   426 ;;       (expand-file-name "~/share/emacs/desire"))
   428 ;; (add-to-list 'auto-mode-alist
   427 ;; (add-to-list 'auto-mode-alist
   429 ;;       (cons (concat (regexp-quote desire-extension) "\\'")
   428 ;;       (cons (concat (regexp-quote desire-extension) "\\'")
   430 ;;         'emacs-lisp-mode))
   429 ;;         'emacs-lisp-mode))
   431 
   430 
   432 ;; ----------------------------------------------------------------------
       
   433 
       
   434 ;; Pilot support
       
   435 ;; (desire 'pilot)
       
   436 
       
   437 ;; ----------------------------------------------------------------------
       
   438 
       
   439 ;; BBDB - Must be loaded before most other things, since other things
       
   440 ;;        may perform special configuration if BBDB is present.
       
   441 ;;
       
   442 ;; (desire 'bbdb "bbdb")
       
   443 
       
   444 ;; ----------------------------------------------------------------------
       
   445 
       
   446 ;; These provide options for the various message handling packages.
       
   447 ;; (desire 'browse-url)
   431 ;; (desire 'browse-url)
   448 ;; (desire 'mailcrypt)
   432 ;; (desire 'mailcrypt)
   449 
       
   450 ;; Message handing packages.
       
   451 ;; (desire 'gnus)
   433 ;; (desire 'gnus)
   452 ;; (desire 'message)
   434 ;; (desire 'message)
   453 ;; (desire 'sendmail)
   435 ;; (desire 'sendmail)
   454 
   436 ;; (desire 'bbdb "bbdb")
   455 ;; ----------------------------------------------------------------------
   437 ;; (desire 'pilot)
   456 
       
   457 ;; Miscellaneous
       
   458 
       
   459 ;; (desire 'abbrev)
       
   460 ;; (desire 'bibtex)
   438 ;; (desire 'bibtex)
   461 ;; (desire 'calc)
       
   462 ;; (desire 'ediff)
       
   463 ;; (desire 'eiffel-mode)
   439 ;; (desire 'eiffel-mode)
   464 ;; (desire 'emacs-w3m)
   440 ;; (desire 'emacs-w3m)
   465 ;; (desire 'eudc)
   441 ;; (desire 'eudc)
   466 ;; (desire 'filladapt)
   442 ;; (desire 'filladapt)
   467 ;;;; (desire 'hugs-mode)
   443 ;;;; (desire 'hugs-mode)
   468 ;; (desire 'haskell-mode)
       
   469 ;; (desire 'latex)
       
   470 ;; (desire 'lispdir)
       
   471 ;; (desire 'mpg123)
   444 ;; (desire 'mpg123)
   472 ;; (desire 'php-mode)
   445 ;; (desire 'php-mode)
   473 ;; (desire 'ps-print)
   446 ;; (desire 'ps-print)
   474 ;; (desire 'sh-script)
       
   475 ;; (desire 'shell)
       
   476 ;; (desire 'tex)
       
   477 ;; (desire 'w3)
       
   478 
       
   479 ;; ======================================================================
       
   480 ;;
       
   481 ;; PERSONAL
       
   482 
       
   483 ;; (require 'chord-mode)  ; edit guitar music.
   447 ;; (require 'chord-mode)  ; edit guitar music.
   484 ;; (require 'discography) ; variant of BibTeX mode for discographies.
   448 ;; (require 'discography) ; variant of BibTeX mode for discographies.
   485 
   449 
   486 ;; ======================================================================
   450 ;; ======================================================================
   487 ;; unNOVICEd commands...
   451 ;; unNOVICEd commands...
   574 (require 'woman)
   538 (require 'woman)
   575 (setq woman-use-own-frame nil)
   539 (setq woman-use-own-frame nil)
   576 (setq woman-fill-frame t)
   540 (setq woman-fill-frame t)
   577 
   541 
   578 ;; ======================================================================
   542 ;; ======================================================================
   579 ;;
   543 ;; shell, sh, bash
   580 ;; SHELL
   544 
   581 
   545 ;; Setup Emacs to run bash as its primary shell.
   582 ;; If you plan to use the bash shell, add the following lines to your .emacs file:
       
   583 ;; (setq binary-process-input t)
   546 ;; (setq binary-process-input t)
   584 ;; (setq w32-quote-process-args ?\")
       
   585 ;; (setq shell-file-name "bash") ;; or sh if you rename your bash executable to sh.
       
   586 ;; (setenv "SHELL" shell-file-name)
       
   587 ;; (setq explicit-shell-file-name shell-file-name)
       
   588 ;; (setq explicit-sh-args '("-login" "-i"))
       
   589 
       
   590 ;; Include the following only if you want to run
       
   591 ;; bash as your shell.
       
   592 
       
   593 ;; Setup Emacs to run bash as its primary shell.
       
   594 ;; (setq shell-file-name "bash")
   547 ;; (setq shell-file-name "bash")
   595 ;; (setq shell-command-switch "-c")
   548 ;; (setq shell-command-switch "-c")
   596 ;; (setq explicit-shell-file-name shell-file-name)
       
   597 ;; (setenv "SHELL" shell-file-name)
   549 ;; (setenv "SHELL" shell-file-name)
   598 ;; (setq explicit-sh-args '("-login" "-i"))
   550 
   599 ;; (if (boundp 'w32-quote-process-args)
   551 (when (eq window-system 'w32)
   600 ;;     (setq w32-quote-process-args ?\")) ;; Include only for MS Windows.
   552   (setq explicit-shell-file-name "bash")
   601 
   553   (setq explicit-bash-args '("-login" "-i"))
   602 ;; (setq sh-shell-file "D:\\home\\cygwin\\bin\\sh.exe")
   554   (setq explicit-sh-args '("-login" "-i")) )
   603 ;; (setq sh-shell-arg (quote ((bash) (csh . "-f") (pdksh) (ksh88) (rc . "-p") (wksh) (zsh . "-f") (sh . "-i"))))
   555 
   604 (setq explicit-bash-args (quote ("-login" "-i")))
   556 ;; ======================================================================
   605 
   557 ;; spell, ispall, aspell
   606 (when (provide 'bat-mode)
       
   607   (progn
       
   608     (add-to-list 'auto-mode-alist '("\\.[bB][aA][tT]\\'" . bat-mode))
       
   609     (add-to-list 'auto-mode-alist '("\\.[cC][mM][dD]\\'" . bat-mode))
       
   610     ))
       
   611 
       
   612 ;; ======================================================================
       
   613 ;;
       
   614 ;; Spell
       
   615 
   558 
   616 (setq ispell-program-name "ispell")
   559 (setq ispell-program-name "ispell")
   617 ;(setq ispell-dictionary "russianw"); default dictionary
   560 ;(setq ispell-dictionary "russianw"); default dictionary
   618 ;(setq ispell-local-dictionary "russianw"); default dictionary
   561 ;(setq ispell-local-dictionary "russianw"); default dictionary
   619 ;(add-hook 'text-mode-hook 'flyspell-mode)
   562 ;(add-hook 'text-mode-hook 'flyspell-mode)
   795 (when (featurep 'dvc-emacs)
   738 (when (featurep 'dvc-emacs)
   796   (setq dvc-tips-enabled nil)
   739   (setq dvc-tips-enabled nil)
   797   )
   740   )
   798 
   741 
   799 ;; ======================================================================
   742 ;; ======================================================================
   800 ;; Devel, prog
   743 ;; devel, prog, programming
   801 
   744 
   802 (add-to-list 'auto-mode-alist '("\\.cu$" . c-mode))
   745 (add-to-list 'auto-mode-alist '("\\.cu$" . c-mode))
   803 
   746 
   804 (setq-default comment-style (quote indent))
   747 (setq-default comment-style (quote indent))
   805 (setq-default comment-column 44)
   748 (setq-default comment-column 44)
   872 
   815 
   873 ;; (add-hook 'asm-mode-hook '(lambda () (local-unset-key ":")))
   816 ;; (add-hook 'asm-mode-hook '(lambda () (local-unset-key ":")))
   874 ;; (add-hook 'asm-mode-hook '(lambda () (local-set-key ":" ":")))
   817 ;; (add-hook 'asm-mode-hook '(lambda () (local-set-key ":" ":")))
   875 
   818 
   876 ;; ----------------------------------------------------------------------
   819 ;; ----------------------------------------------------------------------
   877 ;; LISP
   820 ;; lisp
   878 (setq list-command-history-max 256)
   821 (setq list-command-history-max 256)
   879 
   822 
   880 ;; ----------------------------------------------------------------------
   823 ;; ----------------------------------------------------------------------
   881 ;; C, c-mode, C++, c++-mode
   824 ;; C, c-mode, C++, c++-mode
   882 
   825 
   934 (add-hook 'c-mode-common-hook
   877 (add-hook 'c-mode-common-hook
   935           (lambda () (c-add-style "my" my-c-style t)))
   878           (lambda () (c-add-style "my" my-c-style t)))
   936 (setq c-default-style '((java-mode . "my") (c-mode . "my") (csharp-mode . "my") (c++-mode . "my") (objc-mode . "my") (other . "my")))
   879 (setq c-default-style '((java-mode . "my") (c-mode . "my") (csharp-mode . "my") (c++-mode . "my") (objc-mode . "my") (other . "my")))
   937 
   880 
   938 ;; ----------------------------------------------------------------------
   881 ;; ----------------------------------------------------------------------
       
   882 ;; bat file, batch
       
   883 
       
   884 (when (provide 'bat-mode)
       
   885   (progn
       
   886     (add-to-list 'auto-mode-alist '("\\.[bB][aA][tT]\\'" . bat-mode))
       
   887     (add-to-list 'auto-mode-alist '("\\.[cC][mM][dD]\\'" . bat-mode))
       
   888     ))
       
   889 
       
   890 ;; ----------------------------------------------------------------------
   939 ;; *csharp*, c-sharp
   891 ;; *csharp*, c-sharp
   940 ;;
   892 
   941 (autoload 'csharp-mode "csharp-mode" "Major mode for editing C# code." t)
   893 (autoload 'csharp-mode "csharp-mode" "Major mode for editing C# code." t)
   942 (add-to-list 'auto-mode-alist '("\\.cs$" . csharp-mode))
   894 (add-to-list 'auto-mode-alist '("\\.cs$" . csharp-mode))
   943 
   895 
   944 ;; ----------------------------------------------------------------------
   896 ;; ----------------------------------------------------------------------
   945 ;; *Java*
   897 ;; *Java*