Use run-hook-with-args to run compilation-finish-functions.
(with-no-warnings
(if compilation-finish-function
(funcall compilation-finish-function (current-buffer) msg)))
- (let ((functions compilation-finish-functions))
- (while functions
- (funcall (car functions) (current-buffer) msg)
- (setq functions (cdr functions))))))
+ (run-hook-with-args compilation-finish-functions (current-buffer) msg)))
;; Called when compilation process changes state.
(defun compilation-sentinel (proc msg)