From 0b00023fea47507b9786b26fa8712fb298fc5565 Mon Sep 17 00:00:00 2001 From: Yuki Date: Mon, 8 Oct 2018 16:26:53 +0200 Subject: [PATCH] Add skip major mode list for all-windows highlighting in ex-search --- evil-search.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/evil-search.el b/evil-search.el index e631dfe0..2f8b4df9 100644 --- a/evil-search.el +++ b/evil-search.el @@ -556,12 +556,18 @@ The following properties are supported: "Set the list of active overlays of the highlight HL to OVERLAYS." (aset hl 8 overlays)) +(defcustom evil-ex-hl-skip-major-mode-list '() + "List." + :type '(repeat :type function) + :group 'evil) + (defun evil-ex-hl-buffers() "Return buffers to highlight in." (let ((bufs (list)) buf) (dolist (win (window-list nil -1 nil)) (setq buf (window-buffer win)) - (unless (memq buf bufs) + (unless (or (memq buf bufs) + (memq (with-current-buffer buf major-mode) evil-ex-hl-skip-major-mode-list)) (setq bufs (append bufs (list buf))))) bufs))