Added advice for projectile-configure-project.

This commit is contained in:
tastytea 2019-08-12 06:43:05 +02:00
parent 0cc54e778e
commit 444db8eb4e
1 changed files with 9 additions and 4 deletions

13
init.el
View File

@ -1,5 +1,5 @@
;;; init.el --- tastytea's Emacs init file.
;; Time-stamp: <2019-08-11T22:45:50+00:00>
;; Time-stamp: <2019-08-12T04:40:10+00:00>
;;; Commentary:
;; I am using this file with Emacs 26, but most of it will probably work with
@ -290,13 +290,18 @@ With argument, do this that many times."
(setq projectile-project-compilation-cmd
(concat my/cmake-compile-command " && cd tests && ctest -Q"))
(projectile-mode +1)
(put 'projectile-project-compilation-cmd 'safe-local-variable #'stringp)
;; Mark variable as safe. This prevents prompts when using .dir-locals.el.
(put 'projectile-project-compilation-cmd 'safe-local-variable #'stringp)
(put 'projectile-project-configure-cmd 'safe-local-variable #'stringp)
;; Always run `cmake-ide-run-cmake` after configuring a project.
(defun my/configure-project (old-function &rest arguments)
(apply old-function arguments)
(cmake-ide-run-cmake)
)
(advice-add 'projectile-configure-project :around #'my/configure-project)
:bind
("C-c p" . 'projectile-command-map)
;; (:map projectile-command-map
;; ("k" . 'my/projectile-kill-buffers))
))
;; Highlight TODO, FIXME, NOTE and so on.