use poper emacs namespace, move keys to dedicated minor mode
This commit is contained in:
parent
7f5f90ae4d
commit
76c7d665c7
38 changed files with 337 additions and 221 deletions
36
lang/clang.el
Normal file
36
lang/clang.el
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
;;; languages/clang.el --- summary
|
||||
;;; Commentary:
|
||||
;;; Code:
|
||||
|
||||
(require 'icejam-pkg-projectile "$HOME/.emacs.d/pkg/projectile.el")
|
||||
(require 'icejam-pkg-ctags "$HOME/.emacs.d/pkg/ctags.el")
|
||||
(require 'icejam-pkg-prog-mode "$HOME/.emacs.d/pkg/prog-mode.el")
|
||||
|
||||
(defun activate-clang-mode ()
|
||||
"Goodies for editing c files."
|
||||
|
||||
;; Set column width to 100
|
||||
(column-enforce-n 100)
|
||||
|
||||
;; Set indentation to 4 chars
|
||||
(if (boundp 'c-basic-offset)
|
||||
(setq-local c-basic-offset 4)
|
||||
(defvar c-basic-offset 4))
|
||||
|
||||
(if (boundp 'c-default-style)
|
||||
(setq-local c-default-style "bsd")
|
||||
(defvar c-default-style "bsd"))
|
||||
|
||||
(add-to-list (make-local-variable 'company-backends)
|
||||
'(company-etags company-yasnippet))
|
||||
|
||||
(setq-local
|
||||
ctags/refresh-command
|
||||
(format
|
||||
"ctags -e -R --languages=C -f %sTAGS %s/*"
|
||||
(projectile-project-root) (projectile-project-root))))
|
||||
|
||||
(add-hook 'c-mode-hook 'activate-clang-mode)
|
||||
|
||||
(provide 'icejam-lang-clang)
|
||||
;;; clang.el ends here
|
||||
Loading…
Add table
Add a link
Reference in a new issue