From 20497ccaf2d20b47cf1031e18688add6466a3858 Mon Sep 17 00:00:00 2001 From: "U-WBI\\nxa24469" Date: Mon, 28 Aug 2017 13:00:17 +0200 Subject: [PATCH] Add Windows specific settings --- custom/setup-windows.el | 25 +++++++++++++++++++++++++ init.el | 5 +++++ 2 files changed, 30 insertions(+) create mode 100644 custom/setup-windows.el diff --git a/custom/setup-windows.el b/custom/setup-windows.el new file mode 100644 index 0000000..695b1de --- /dev/null +++ b/custom/setup-windows.el @@ -0,0 +1,25 @@ +;; Windows performance tweaks +;; +(when (boundp 'w32-pipe-read-delay) + (setq w32-pipe-read-delay 0)) +;; Set the buffer size to 64K on Windows (from the original 4K) +(when (boundp 'w32-pipe-buffer-size) + (setq irony-server-w32-pipe-buffer-size (* 64 1024))) + +;; Set pipe delay to 0 to reduce latency of irony +(setq w32-pipe-read-delay 0) + +;; From "setting up irony mode on Windows" : +;; Make sure the path to clang.dll is in emacs' exec_path and shell PATH. +(setenv "PATH" + (concat + "C:\\msys64\\usr\\bin" ";" + "C:\\msys64\\mingw64\\bin" ";" + (getenv "PATH") + ) +) +(setq exec-path (append '("c:/msys64/usr/bin" "c:/alt/msys64/mingw64/bin") + exec-path)) + + +(provide 'setup-windows) diff --git a/init.el b/init.el index 15aeead..92e016d 100644 --- a/init.el +++ b/init.el @@ -81,6 +81,11 @@ ;; setup autocompletion (require 'setup-autocompletion) +;; setup Windows if our bootloader is Windows +(if (eq system-type 'windows-nt) + (require 'setup-windows) + ) + (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful.