;;; -*- lexical-binding: t -*- ;; ;; this file: ;; https://dataswamp.org/~incal/emacs-init/ide/compilation-incal.el (require 'close) (require 'compile) (require 'super) (setq compilation-read-command nil) (setq compilation-scroll-output t) (defun find-digit (&optional rev) (let ((dig "[[:digit:]]")) (if rev (re-search-backward dig nil t) (re-search-forward dig nil t) ))) (defun goto-prev-number () (interactive) (find-digit t) ) (defun goto-next-number () (interactive) (forward-char) (if (find-digit) (goto-char (match-beginning 0)) (backward-char) )) (defun compilation-set-keys () (let ((kmap compilation-mode-map)) (set-close-key kmap) (disable-super-global-keys kmap) (keymap-set kmap "j" #'goto-prev-number) (keymap-set kmap "l" #'goto-next-number) )) ;; (setq compilation-mode-hook nil) (defun compilation-mode-hook-f () (compilation-set-keys) (visual-line-mode) ) (add-hook 'compilation-mode-hook #'compilation-mode-hook-f) (provide 'compilation-incal)