diff --git a/.emacs.d/include/cppconfig.el b/.emacs.d/include/cppconfig.el deleted file mode 100644 index 7d02074..0000000 --- a/.emacs.d/include/cppconfig.el +++ /dev/null @@ -1,31 +0,0 @@ -;;; cppconfig.el --- Configuration for C/C++ -;;; Commentary: -;; Custom configuration for C/C++. -;;; Code: - -(defun custom-compile-c++ () - "Run the `just' command -- the command I use to compile my environment." - (interactive) - (save-buffer) - (compile (concat "just build " (buffer-name)))) - -(defun custom-run-c++ () - "Run the produced `bin' binary." - (interactive) - - (let ((buf (get-buffer-create "*bin-output*"))) - (shell-command "./bin" buf buf) - (pop-to-buffer buf) - (read-only-mode 1))) - -(defun configure-c++ () - "Configure my custom C++ enviroment." - (keymap-local-set "C-c C-c" #'custom-compile-c++) - (keymap-local-set "C-c C-r" #'custom-run-c++) - (keymap-local-set "C-c C-." #'company-complete)) - -(add-hook 'c-mode-hook #'configure-c++) -(add-hook 'c++-mode-hook #'configure-c++) - -(provide 'cppconfig) -;;; cppconfig.el ends here diff --git a/.emacs.d/include/priime-languages.el b/.emacs.d/include/priime-languages.el index 691c698..eaef563 100644 --- a/.emacs.d/include/priime-languages.el +++ b/.emacs.d/include/priime-languages.el @@ -30,6 +30,12 @@ (unless (equal current-prefix-arg nil) (delete-other-windows))) +(defun custom-compile-c++ () + "Run the `just' command -- the command I use to compile my environment." + (interactive) + (save-buffer) + (compile (concat "just build " (buffer-name)))) + ;;; Languages (use-package racket-mode :straight t @@ -94,6 +100,7 @@ (use-package inf-elixir :straight t) (use-package nix-mode :straight t) (use-package irony :straight t + :bind (("C-c C-c" . custom-compile-c++)) :hook ((c++-mode c-mode) . irony-mode)) (provide 'priime-languages) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 548915c..1221a15 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -36,7 +36,6 @@ (when (equal (system-name) "framework") (load-library "mu4econfig")) (load-library "latexconfig") -(load-library "cppconfig") (load-library "gpgconfig") ;; ====== Hooks ==============================