      (point-min) (point-max) nil)
     (buffer-string)))
 
-(defun rtags-eldoc-function ()
-  (if (rtags-is-indexed)
-      (let ((summary (rtags-get-summary-text)))
-        (and summary
-             (fontify-string
-              (replace-regexp-in-string
-               "{[^}]*$" ""
-               (mapconcat
-                (lambda (str) (if (= 0 (length str)) "//" (string-trim str)))
-                (split-string summary "\r?\n")
-                ""))
-              major-mode)))))
-
 (require 'compile)
 (bind-key "C-c C-t"
           '(lambda ()

(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)
