[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Show *compilation* only if build did not succeed
From: |
Stefan Monnier |
Subject: |
Re: Show *compilation* only if build did not succeed |
Date: |
Sat, 22 Dec 2018 13:21:31 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> (defadvice compilation-start
> (around inhibit-display
> (command &optional mode name-function highlight-regexp))
> (if (not (string-match "^\\(find\\|grep\\)" command))
> (cl-letf (((symbol-function 'display-buffer) #'ignore)
> ((symbol-function 'set-window-point) #'ignore)
> ((symbol-function 'goto-char) #'ignore))
> (save-window-excursion ad-do-it))
> ad-do-it))
BTW, is the `goto-char` override really effective?
It doesn't affect calls to goto-char made from byte-compiled code, so
there's a good chance that it ends up not doing anything.
Stefan