Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 1.25 KB | None | 0 0
  1. (defun my/c-mode-hook()
  2.     (c-add-style "mycodingstyle"
  3.                  '((c-basic-offset . 4)
  4.                    (c-comment-only-line-offset . 0)
  5.                    (c-hanging-braces-alist . ((substatement-open before after)))
  6.                    (c-offsets-alist . ((topmost-intro        . 0)
  7.                                        (topmost-intro-cont   . 0)
  8.                                        (substatement         . 4)
  9.                                        (substatement-open    . 4)
  10.                                        (statement-case-open  . 4)
  11.                                        (statement-cont       . 4)
  12.                                        (access-label         . -4)
  13.                                        (inclass              . 4)
  14.                                        (inline-open          . 0)
  15.                                        (innamespace          . 0)))))
  16.     (c-set-style "mycodingstyle")
  17.     (local-set-key (kbd "C-4") 'ff-find-other-file)
  18.     (font-lock-add-keywords 'c++-mode
  19.                             '(("constexpr" . 'font-lock-keyword-face)
  20.                               ("auto" . 'font-lock-keyword-face))))
  21.  
  22. (add-hook 'c-mode-common-hook 'my/c-mode-hook)
  23.   (add-hook 'c++-mode-common-hook 'my/c-mode-hook)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement