From 1ef71f02b8bebc865170caadb6f59c2b5c5fa3b9 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sun, 28 Jul 2024 16:10:19 +0200 Subject: [PATCH] Warn of missing customization for `grep.el` on Windows --- init.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/init.el b/init.el index a53473a..fe716de 100644 --- a/init.el +++ b/init.el @@ -3172,6 +3172,18 @@ eventuelly be set to nil, however)." ((nil) (warn "Server not running, check logs and restart manually.")) (t (warn "`server-running-p' returned neither nil nor t. Check and restart server manually if required.")))))) + ;; Warn of Windows pecularitites + + (when on-windows + ;; Warn if `grep-find-template' or `grep-find-command' are undefined in `grep.el', because then + ;; they would be set by `grep-compute-defaults', which in turn uses `find-program', which is set + ;; to "find", which on Windows might be CMD's FIND, which does something else (it's more akin to + ;; grep). + (when (and (require 'grep nil t) + (or (null grep-find-template) + (null grep-find-command))) + (warn (concat "`grep-find-template' or `grep-find-command' are undefined, please customize these to use the right version of `find'")))) + ;; Load custom code (dolist (file db/after-init-load-files)