"When a user kills the status buffer, stop watching the project."
;; If the server is dead, allow anything to be killed
- (when (Omake.Server.running-p)
- (when (Omake.Buffer.is-status-buffer (current-buffer))
+ ;; Omake.Server.running-p is really expensive, because it runs a
+ ;; command. Check the buffer name first.
+ ;; CR pszilagyi: This should really not be a global
+ ;; kill-buffer-hook. Then it gets called on all buffers, like
+ ;; temporary buffers created by all manner of Emacs built-in
+ ;; functions. We should only install this hook locally in
+ ;; buffers where it might apply, like omake-mode.
+ (when (Omake.Buffer.is-status-buffer (current-buffer))
+ (when (Omake.Server.running-p)