Fix clang-include-fixer and disable keybinding.

This commit is contained in:
tastytea 2019-09-29 16:09:42 +02:00
parent fab6f89425
commit f8310f1fee
1 changed files with 9 additions and 9 deletions

18
init.el
View File

@ -1,5 +1,5 @@
;;; init.el --- tastytea's Emacs init file. ;;; init.el --- tastytea's Emacs init file.
;; Time-stamp: <2019-09-29T13:08:56+00:00> ;; Time-stamp: <2019-09-29T13:46:54+00:00>
;;; Commentary: ;;; Commentary:
;; Requires at least Emacs 24.3. ;; Requires at least Emacs 24.3.
@ -550,21 +550,21 @@ With argument, do this that many times."
) )
;; Add #include directives for missing symbols. ;; Add #include directives for missing symbols.
;; Broken: Can't pass build directory, run-find-all-symbols.py crashes. ;; Broken: Can't pass build directory, needs .clang-format.
(use-package clang-include-fixer (use-package clang-include-fixer
:ensure nil ; Installed by clang. :ensure nil ; Installed by clang.
:if (executable-find "clang-include-fixer") :if (executable-find "clang-include-fixer")
:init :init
(defvar my/clang-tool-path (defvar my/llvm-path
(concat (file-name-directory (executable-find "clang-include-fixer")) (concat (file-name-directory (executable-find "clang-include-fixer")) ".."))
"../share/clang")) (add-to-list 'load-path (concat my/llvm-path "/share/clang"))
(add-to-list 'load-path my/clang-tool-path)
:config :config
(defun my/clang-find-all-symbols () (defun my/clang-find-all-symbols ()
(shell-command (concat my/clang-tool-path (shell-command (concat my/llvm-path
"/run-find-all-symbols.py -p build"))) "/share/clang/run-find-all-symbols.py -b "
my/llvm-path "/bin/find-all-symbols")))
:bind :bind
("C-x M-i" . clang-include-fixer) ;; ("C-x M-i" . clang-include-fixer)
) )
;;;;;;;;;;;;;;;;;;;; Appearance ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;; Appearance ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;