जब कोई त्रुटि नहीं है और कोई चेतावनी नहीं है, तो मैं संकलन बफर को बंद करना चाहता हूं, लेकिन चेतावनी होने पर मैं इसे दिखाना चाहता हूं। कोई मुझे मदद कर सकता है? emacswiki से यह कोड केवल पहली आवश्यकता है। इसे कैसे बदलें?emacs संकलित बफर ऑटो बंद?
;; 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)
आप क्या संकलित कर रहे हैं? – Thomas
@ थॉमस यह महत्वपूर्ण समस्या नहीं है – Iceman
यह जानना उपयोगी हो सकता है कि आप कौन से कंपाइलर चल रहे हैं क्योंकि आप त्रुटियों या चेतावनियों की जांच करने के लिए 'msg' पैरामीटर का उपयोग करने में सक्षम हो सकते हैं। – Thomas