lang/cc: don't complain about missing rtags executable

This commit is contained in:
Henrik Lissner 2018-05-09 11:26:48 +02:00
parent 30e0ab6aef
commit 158c853e63
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 3 additions and 2 deletions

View file

@ -92,7 +92,8 @@ compilation dbs."
;;;###autoload ;;;###autoload
(defun +cc|init-rtags () (defun +cc|init-rtags ()
"Start an rtags server in c-mode and c++-mode buffers." "Start an rtags server in c-mode and c++-mode buffers."
(when (memq major-mode '(c-mode c++-mode)) (when (and (memq major-mode '(c-mode c++-mode))
(rtags-executable-find "rtags"))
(rtags-start-process-unless-running))) (rtags-start-process-unless-running)))
;;;###autoload ;;;###autoload

View file

@ -213,7 +213,7 @@ compilation database is present in the project.")
;; ;;
(def-package! rtags (def-package! rtags
:commands (rtags-restart-process rtags-start-process-unless-running) :commands (rtags-restart-process rtags-start-process-unless-running rtags-executable-find)
:init :init
(add-hook! (c-mode c++-mode) #'+cc|init-rtags) (add-hook! (c-mode c++-mode) #'+cc|init-rtags)
:config :config