使Emacs停止询问“活动过程存在;杀死他们并退出“ [英] Make Emacs stop asking "Active processes exist; kill them and exit anyway"

查看:108
本文介绍了使Emacs停止询问“活动过程存在;杀死他们并退出“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尽管所有的建议都是一个坏主意,但是我坚持希望Emacs在C-c C-x上停止询问我活动进程是否存在,杀死他们并退出。我希望它只是杀死所有活动的进程,而不要求。



我该如何实现?

解决方案

这个代码片段(进入你的.emacs定制文件)将暂时使Emacs认为当你杀死它时没有活动的进程,因此你不会得到令人讨厌的提示。 >

 (require'cl-lib)
(defadvice save-buffers-kill-emacs(around no-query-kill-emacs激活)
当你退出Emacs时,有效的进程存在\查询
(cl-letf((symbol-function#'process-list)(lambda()) ))
ad-do-it))


In spite of all the advice that it is a bad idea, I still would like Emacs to stop asking me "Active processes exist; kill them and exit anyway" when I hit C-c C-x. I would like it to simply kill all active processes without asking.

How can I accomplish this?

解决方案

This snippet (goes into your .emacs customization file) will temporarily make Emacs believes that there is no active process when you kill it, and therefore you won't get the annoying prompt.

(require 'cl-lib)
(defadvice save-buffers-kill-emacs (around no-query-kill-emacs activate)
  "Prevent annoying \"Active processes exist\" query when you quit Emacs."
  (cl-letf (((symbol-function #'process-list) (lambda ())))
    ad-do-it))

这篇关于使Emacs停止询问“活动过程存在;杀死他们并退出“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆