Getting rid of “buffer has running process” confirmation when the process is a flymake process

StackOverflow https://stackoverflow.com/questions/7299893

  •  20-01-2021
  •  | 
  •  

Вопрос

Is there a way to tell emacs to always kill flymake processes when I'm closing the associated buffer? I don't want to get the confirmation when the only process associated with the buffer is a flymake process?

Это было полезно?

Решение

Here's a patch. The gist is to modify the function that invokes flymake to use set-process-query-on-exit-flag to set the process-query-on-exit-flag variable to nil for the flymake process. See also C-h f set-process-query-on-exit-flag.

Другие советы

You can also turn the process-query-on-exit-flag off with advice:

(defadvice flymake-start-syntax-check-process (after
                                               cheeso-advice-flymake-start-syntax-check-1
                                               (cmd args dir)
                                               activate compile)
  ;; set flag to allow exit without query on any
  ;;active flymake processes
  (set-process-query-on-exit-flag ad-return-value nil))

This has the same effect as the patch above, but it does not require modifying flymake.el .

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top