1

我想在编译完成时删除编译缓冲区。

以下是我的 init-compile.el

(require 'compile)

(defun notify-compilation-result(buffer msg)
  (if (string-match "Compilation finished" msg)
      (progn (delete-windows-on buffer)))
  (setq current-frame (car (car (cdr (current-frame-configuration)))))
  (select-frame-set-input-focus current-frame))

(add-to-list 'compilation-finish-functions 
             'notify-compilation-result)

(provide 'init-compile)

如何匹配纯字符串?

4

1 回答 1

0

这会有帮助吗?

(cl-search "compilation finished" "whatever compilation finished whatever")
9
(cl-search "compilation finished" "compilation did not finish")
nil
于 2013-07-17T04:41:29.847 回答