.emacs-my
changeset 131 bd2400a18295
parent 130 15209a6a5357
child 133 2c8704877013
equal deleted inserted replaced
130:15209a6a5357 131:bd2400a18295
   812 
   812 
   813 (defconst my-c-style
   813 (defconst my-c-style
   814   '((c-tab-always-indent . t)
   814   '((c-tab-always-indent . t)
   815     (c-comment-only-line-offset . 4)
   815     (c-comment-only-line-offset . 4)
   816     (c-hanging-braces-alist
   816     (c-hanging-braces-alist
   817      . ((substatement-open after)
   817      . (
   818         (brace-list-open)))
   818         (brace-list-open)
       
   819         (substatement-open after)
       
   820         ))
   819     (c-hanging-colons-alist
   821     (c-hanging-colons-alist
   820      . ((member-init-intro before)
   822      . (
       
   823         (access-label after)
       
   824         (case-label after)
   821         (inher-intro)
   825         (inher-intro)
   822         (case-label after)
       
   823         (label after)
   826         (label after)
   824         (access-label after)))
   827         (member-init-intro before)
       
   828         ))
   825     (c-cleanup-list
   829     (c-cleanup-list
   826      . (scope-operator
   830      . (
       
   831         defun-close-semi
   827         empty-defun-braces
   832         empty-defun-braces
   828         defun-close-semi))
   833         scope-operator
       
   834         ))
   829     (c-offsets-alist
   835     (c-offsets-alist
   830      . ((arglist-intro . ++)
   836      . (
   831         (arglist-close . c-lineup-arglist)
   837         (arglist-close . c-lineup-arglist)
   832         (arglist-cont-nonempty . ++)
   838         (arglist-cont-nonempty . ++)
       
   839         (arglist-intro . ++)
       
   840         (block-open . 0)
       
   841         (case-label . 0)
       
   842         (comment-intro . 0)
       
   843         (func-decl-cont . ++)
       
   844         (inexpr-class . 0)
       
   845         (inline-open . 0)
       
   846         (knr-argdecl-intro . -)
       
   847         (label . 0)
   833         (statement-block-intro . +)
   848         (statement-block-intro . +)
   834         (inline-open . 0)
       
   835         (inexpr-class . 0)
       
   836         (func-decl-cont . ++)
       
   837         (statement-cont . ++)
   849         (statement-cont . ++)
   838         (label . 0)
       
   839         (substatement-open . 0)
   850         (substatement-open . 0)
   840         (case-label . 0)
   851         ))
   841         (block-open . 0)
       
   842         (comment-intro . 0)
       
   843         (knr-argdecl-intro . -)))
       
   844     (c-echo-syntactic-information-p . t))
   852     (c-echo-syntactic-information-p . t))
   845   "My C Programming Style")
   853   "My C Programming Style")
   846 
   854 
   847 ;; (objc-mode . "my-mode") (c++-mode . "cc-mode")
   855 ;; (objc-mode . "my-mode") (c++-mode . "cc-mode")
   848 (add-hook 'c-mode-common-hook
   856 (add-hook 'c-mode-common-hook