From d55aefe618f97e522a5f2f8cafeef61a1ce62374 Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 30 Sep 2019 12:01:24 +0200 Subject: [PATCH] my/clang-include-filter should work now. --- init.el | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/init.el b/init.el index 793e226..6657e7e 100644 --- a/init.el +++ b/init.el @@ -561,7 +561,6 @@ With argument, do this that many times." ) ;; Add #include directives for missing symbols. -;; Broken: Can't pass build directory. (use-package clang-include-fixer :ensure nil ; Installed by clang. :if (executable-find "clang-include-fixer") @@ -571,11 +570,21 @@ With argument, do this that many times." (add-to-list 'load-path (concat my/llvm-path "/share/clang")) :config (defun my/clang-find-all-symbols () - (shell-command (concat my/llvm-path - "/share/clang/run-find-all-symbols.py -b " - my/llvm-path "/bin/find-all-symbols"))) + "Invokes run-find-all-symbols.py." + (interactive) + (shell-command (concat "cd " (my/get-builddir) " && " + my/llvm-path "/share/clang/run-find-all-symbols.py" + " -b " my/llvm-path "/bin/find-all-symbols"))) + (defun my/clang-include-fixer () + "Invoke clang-include-fixer with -p=build." + (interactive) + (message (concat "Calling the include fixer. " + "This might take some seconds. Please wait.")) + (clang-include-fixer--start #'clang-include-fixer--add-header + "-output-headers" + (concat "-p=" (my/get-builddir)))) :bind - ;; ("C-x M-i" . clang-include-fixer) + ("C-x M-i" . my/clang-include-fixer) ) ;;;;;;;;;;;;;;;;;;;; Appearance ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;