home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

commit 840cebd59e3f126c51db83332e4429d21e8cc2c8
parent ee30cadd7a23bb5228269d3da67253a203a32908
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Mon, 27 Nov 2023 15:45:03 +0100

tools/emacs: goto-address-mode only on prog and text

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Mtools/emacs/config/config-buffers.el | 6+++++-
Mtools/emacs/config/config-compile.el | 8+-------
2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/tools/emacs/config/config-buffers.el b/tools/emacs/config/config-buffers.el @@ -91,7 +91,11 @@ helpful-mode compilation-mode)) (popper-mode +1) - (popper-echo-mode +1)) + (popper-echo-mode +1)) + +(use-package goto-addr + :hook ((text-mode . goto-address-mode) + (prog-mode . goto-address-prog-mode))) (provide 'config-buffers) ;;; config-buffers.el ends here diff --git a/tools/emacs/config/config-compile.el b/tools/emacs/config/config-compile.el @@ -51,11 +51,6 @@ (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. @@ -96,8 +91,7 @@ "\\|" "Password for 'http.*github.*':" "\\)")) - (add-hook 'compilation-filter-hook #'vde/colorize-compilation-buffer) - (add-hook 'compilation-mode-hook #'vde/goto-address-mode)) + (add-hook 'compilation-filter-hook #'vde/colorize-compilation-buffer)) (use-package emacs :bind