.emacs-my
changeset 54 d8b07256d33c
parent 53 0d8616eedf8b
child 56 7cb8a2dc4a53
equal deleted inserted replaced
53:0d8616eedf8b 54:d8b07256d33c
   663 ;; ======================================================================
   663 ;; ======================================================================
   664 ;; Devel, prog
   664 ;; Devel, prog
   665 
   665 
   666 (add-to-list 'auto-mode-alist '("\\.cu$" . c-mode))
   666 (add-to-list 'auto-mode-alist '("\\.cu$" . c-mode))
   667 
   667 
       
   668 (setq comment-style (quote indent))
       
   669 
   668 (setq-default show-trailing-whitespace t)
   670 (setq-default show-trailing-whitespace t)
   669 ;; (add-hook 'c-mode-hook '(lambda ()
       
   670 ;;                           (setq show-trailing-whitespace t)))
       
   671 
   671 
   672 ;; ----------------------------------------------------------------------
   672 ;; ----------------------------------------------------------------------
   673 ;; Diff, patch
   673 ;; Diff, patch
   674 (setq diff-switches "-u")
   674 (setq diff-switches "-u")
   675 
   675 
   683 
   683 
   684 ;; TAB (tab settings)
   684 ;; TAB (tab settings)
   685 (setq-default tab-width 4)
   685 (setq-default tab-width 4)
   686 (setq-default indent-tabs-mode nil)     ; t - будут вставляться \t
   686 (setq-default indent-tabs-mode nil)     ; t - будут вставляться \t
   687 (setq tab-always-indent t)
   687 (setq tab-always-indent t)
   688 (setq tab-stop-list (quote (0 4 8 12 16 20 24 28 32 36 40)))
       
   689 (setq c-tab-always-indent t)
   688 (setq c-tab-always-indent t)
   690 
   689 (loop for x downfrom 40 to 1 do
   691 (setq comment-style (quote indent))
   690       (setq tab-stop-list (cons (* x 4) tab-stop-list)))
   692 
   691 
   693 ;; ----------------------------------------------------------------------
   692 ;; ----------------------------------------------------------------------
   694 ;; Diff.
   693 ;; Diff.
   695 (setq ediff-diff-options "")
   694 (setq ediff-diff-options "")
   696 
   695 
   759 ;; Customizations for all modes in CC Mode.
   758 ;; Customizations for all modes in CC Mode.
   760 ;; (defun my-c-mode-common-hook ()
   759 ;; (defun my-c-mode-common-hook ()
   761 ;;   ;; add my personal style and set it for the current buffer
   760 ;;   ;; add my personal style and set it for the current buffer
   762 ;;   (c-add-style "PERSONAL" my-c-style t)
   761 ;;   (c-add-style "PERSONAL" my-c-style t)
   763 ;;   ;; other customizations
   762 ;;   ;; other customizations
   764 ;;   (setq tab-width 8
       
   765 ;;         ;; this will make sure spaces are used instead of tabs
       
   766 ;;         indent-tabs-mode nil)
       
   767 ;;   ;; we like auto-newline and hungry-delete
   763 ;;   ;; we like auto-newline and hungry-delete
   768 ;;   (c-toggle-auto-hungry-state 1)
   764 ;;   (c-toggle-auto-hungry-state 1)
   769 ;;   ;; key bindings for all supported languages.  We can put these in
   765 ;;   ;; key bindings for all supported languages.  We can put these in
   770 ;;   ;; c-mode-base-map because c-mode-map, c++-mode-map, objc-mode-map,
   766 ;;   ;; c-mode-base-map because c-mode-map, c++-mode-map, objc-mode-map,
   771 ;;   ;; java-mode-map, idl-mode-map, and pike-mode-map inherit from it.
   767 ;;   ;; java-mode-map, idl-mode-map, and pike-mode-map inherit from it.