Hata ve uyarı olmadığında derleme arabelleğini otomatik olarak kapatmak istiyorum, ancak uyarı olduğunda bunu göstermek istiyorum. Bana yardım edebilecek kimse var mı? Bu kod emacswiki'dan sadece ilk gerekliliği yapar. Nasıl değiştirilir?emacs arabellek otomatik kapat?
;; Helper for compilation. Close the compilation window if
;; there was no error at all.
(defun compilation-exit-autoclose (status code msg)
;; If M-x compile exists with a 0
(when (and (eq status 'exit) (zerop code))
;; then bury the *compilation* buffer, so that C-x b doesn't go there
(bury-buffer)
;; and delete the *compilation* window
(delete-window (get-buffer-window (get-buffer "*compilation*"))))
;; Always return the anticipated result of compilation-exit-message-function
(cons msg code))
;; Specify my function (maybe I should have done a lambda function)
(setq compilation-exit-message-function 'compilation-exit-autoclose)
Ne derliyorsunuz? – Thomas
@Thomas bu önemli bir sorun değil. – Iceman
Hangi derleyiciyi çalıştırdığınızı bilmek faydalı olabilir çünkü hata veya uyarı olup olmadığını kontrol etmek için 'msg' parametresini kullanabilirsiniz. – Thomas