commit d1e446530284e8bb50101a8c4966059e97607c59
parent 615ab3a80e2eaf86a3b1edc95c066c3ce3bf102a
Author: Vincent Demeester <vincent@sbr.pm>
Date: Mon, 4 May 2020 14:48:21 +0200
config-compile.el: do not add goto-address-mode…
… for rg/ag/grep modes.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/emacs/config/config-compile.el b/tools/emacs/config/config-compile.el
@@ -17,6 +17,11 @@
(derived-mode-p 'rg-mode))
(let ((inhibit-read-only t))
(ansi-color-apply-on-region compilation-filter-start (point)))))
+ (defun vde/goto-address-mode ()
+ (unless (or (derived-mode-p 'grep-mode)
+ (derived-mode-p 'ag-mode)
+ (derived-mode-p 'rg-mode))
+ (goto-address-mode t)))
:config
(setq-default compilation-scroll-output t
;; I'm not scared of saving everything.
@@ -32,7 +37,7 @@
;; Show three lines of context around the current message
compilation-context-lines 3)
(add-hook 'compilation-filter-hook #'vde/colorize-compilation-buffer)
- :hook ((compilation-mode . goto-address-mode)))
+ (add-hook 'compilation-mode-hook #'vde/goto-address-mode))
;; -UseCompile
;; UseFlycheck