How do I answer y automatically (kill-matching-buffers asks if I should kill a modified buffer)?

前端 未结 4 623
深忆病人
深忆病人 2021-01-12 05:28

In Emacs - how do I kill buffers matching regexp?

Edit:

How do I answer y automatically (kill-matching-buffers ask

4条回答
  •  情话喂你
    2021-01-12 06:21

    For Emacs version >=24, the kmb.el library from ELPA repository does exactly that with the command kmb-kill-matching-buffers-no-ask.

    It also provides the command kmb-delete-process-and-kill-buffer-no-ask, which kills the current buffer (without confirmation).

    I bind the latter command as follows:

    (global-set-key (kbd "H-M-") 'kmb-delete-process-and-kill-buffer-no-ask)
    

    so that i don't call it accidentaly, just when i need it.

提交回复
热议问题