[英]Getting rid of “buffer has running process” confirmation when the process is a flymake process
Is there a way to tell emacs to always kill flymake processes when I'm closing the associated buffer? 当我关闭相关缓冲区时,有没有办法告诉emacs总是杀死flymake进程? I don't want to get the confirmation when the only process associated with the buffer is a flymake process? 当与缓冲区关联的唯一进程是flymake进程时,我不想得到确认?
You can also turn the process-query-on-exit-flag
off with advice: 您还可以通过以下建议关闭process-query-on-exit-flag
:
(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 . 这与上面的补丁具有相同的效果,但它不需要修改flymake.el。
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. 要点是修改调用flymake的函数,使用set-process-query-on-exit-flag
为flymake进程设置process-query-on-exit-flag
变量为nil
。 See also Ch f set-process-query-on-exit-flag
. 另请参见Ch f set-process-query-on-exit-flag
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.