Skip to content

Commit

Permalink
Personal style updates (retire defunct C++ style)
Browse files Browse the repository at this point in the history
  • Loading branch information
Caleb Epstein committed Sep 4, 2019
1 parent 26ca4cb commit b7261eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 41 deletions.
39 changes: 0 additions & 39 deletions personal/c-style.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,9 @@
;; Treat Slice files as IDL
(add-to-list 'auto-mode-alist '("\\.ice\\'" . idl-mode))

;; Style mode hook for C++
(c-add-style "snail-cpp-style"
'((c-tab-always-indent . t)
(indent-tabs-mode . nil)
(c-basic-offset . 4)
(c-comment-only-line-offset . 4)
(c-hanging-braces-alist . ((substatement-open after)
(brace-list-open)))
(c-hanging-colons-alist . ((member-init-intro before)
(inher-intro)
(case-label after)
(label after)
(access-label after)))
(c-cleanup-list . (scope-operator
empty-defun-braces
space-before-funcall
defun-close-semi))
(c-offsets-alist . ((arglist-close . c-lineup-arglist)
(substatement-open . 0)
(inmodule . 0)
(case-label . +)
(block-open . 0)
(innamespace . 0)
(inextern-lang . 0)
(comment-intro . 0)
(inline-open . 0)
(knr-argdecl-intro . -)))
))

(defun snail-style-c++-mode-hook ()
(c-set-style "snail-cpp-style")
;; (auto-fill-mode)
(c-toggle-auto-hungry-state 1)
(c-toggle-electric-state 1)
(c-toggle-auto-newline -1))

;; (add-hook 'prelude-c-mode-common-hook 'snail-style-c++-mode-hook)
(add-hook 'prelude-c-mode-common-hook 'ggtags-mode)

;; Use C++ style for IDL files
;; (add-hook 'idl-mode-hook 'snail-style-c++-mode-hook)

(add-hook 'prelude-c-mode-common-hook 'google-set-c-style)
(add-hook 'idl-mode-hook 'google-set-c-style)

Expand Down
8 changes: 6 additions & 2 deletions personal/caleb.el
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@
(setq sp-use-paredit-bindings nil)
(setq ibuffer-expert t)
(desktop-save-mode 1)
(global-undo-tree-mode -1)

;; Smartparens kinda sucks
(setq smartparens-mode -1)
(add-hook 'prog-mode-hook (lambda () (smartparens-mode -1)) t)
(add-hook 'python-mode-hook (lambda () (anaconda-mode -1)) t)
(add-hook 'python-mode-hook 'py-autopep8-enable-on-save)
;; (add-hook 'python-mode-hook 'py-autopep8-enable-on-save)
;; (add-hook 'python-mode-hook 'py-yapf-enable-on-save)
(add-hook 'python-mode-hook 'blacken-mode)
(add-hook 'python-mode-hook 'pylint-add-menu-items)
(add-hook 'python-mode-hook 'pylint-add-key-bindings)

(require 'diminish)

Expand All @@ -39,7 +44,6 @@
(global-set-key (kbd "<f8>") 'vc-dir)
(global-set-key (kbd "<XF86MailForward>") 'vc-dir)

(require 'prelude-helm-everywhere)
(global-set-key (kbd "C-<return>") 'helm-M-x)
;; (setq helm-command-prefix-key "C-c h")
;; (global-set-key (kbd "C-x b") 'helm-mini)
Expand Down

0 comments on commit b7261eb

Please sign in to comment.