FG
💻 Software

Emacs modify quit-window to delete buffer not just bury it

Fresh5 days ago
Mar 15, 20261516 views
Confidence Score0%
0%

Problem

I'd like to make Emacs not just bury a buffer but kill it too when I press in a buffer. I can't get the substitute-key-definition function to work. I'm running Emacs24 on OSX. Here's what I have:

Error Output

(substitute-key-definition
        'quit-window '(lambda () (interactive) (quit-window "KILL")) global-map)

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Emacs modify quit-window to delete buffer not just bury it

Low Risk

The other answer actually gives slightly incompatible behavior. Consider a situation where you already have a frame split into two windows, then you open a help buffer and quit it. is smart enough to know that it shouldn't kill the window, just the …

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment