 (setq compile-command "ninja")
 
 (defun my-c-mode-common-hook ()
-  (setq-local fill-column 90)
-  (when use-rtags
-    (add-to-list 'company-backends 'company-rtags))
-  ;; (setq rtags-show-containing-function t)
-  ;; (setq-local eldoc-documentation-function #'rtags-eldoc-function)
-  ;; (eldoc-mode 1)
-  ;; (when (not *kelly*)
-  ;;  (setq rtags-autostart-diagnostics t)))
-  )
+  (setq-local fill-column 90))
 
 (add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
 

(add-to-list 'cff-source-regexps '("\\.m$" . (lambda (base) (concat base ".m"))))
(add-to-list 'cff-source-regexps '("\\.mm$" . (lambda (base) (concat base ".mm"))))

(defun my-goto-symbol ()
  (interactive)
  (save-buffer)
  (deactivate-mark)
  (xref-push-marker-stack)
  (or (and use-rtags
           (rtags-is-indexed)
           (rtags-find-symbol-at-point))
      (dumb-jump-go)))

(with-eval-after-load 'cc-mode
  (fset 'c-indent-region 'clang-format-region)
  (bind-keys :map c-mode-base-map
             ("<C-tab>" . company-complete)
             ("M-." . my-goto-symbol)
             ("M-," . xref-pop-marker-stack)
             ("C-M-\\" . clang-format-region)
             ("C-i" . clang-format)
             ("C-." . my-imenu)
             ("M-o" . cff-find-other-file))
  (when use-rtags
    (bind-key "M-?" 'rtags-display-summary c-mode-base-map)))

(setq inf-clojure-program '("localhost" . 9999))   ;; "planck"
(add-hook 'clojure-mode-hook 'inf-clojure-minor-mode)

  (company-mode)
  ;; (semantic-mode 1)
  ;; (delete '(scheme-mode . semantic-default-scheme-setup) semantic-new-buffer-setup-functions)
  )

(add-hook 'text-mode-hook 'auto-fill-mode)
(add-hook 'text-mode-hook 'my-non-special-modes-setup)
