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

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

问题描述

尽管所有的建议都说这是一个坏主意,但我仍然希望 Emacs 在我按下 C-c C-x 时不要再问我活动进程存在;杀死它们并退出".我希望它无需询问即可简单地终止所有活动进程.

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?

推荐答案

这个片段(进入你的 .emacs 自定义文件)会暂时让 Emacs 在你杀死它时相信没有活动进程,因此你不会收到烦人的提示.

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天全站免登陆