emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: C-x C-v considered harmful


From: Drew Adams
Subject: RE: C-x C-v considered harmful
Date: Thu, 9 Jul 2009 09:09:56 -0700

> The variable `kill-buffer-query-functions' is nil by default,
> so maybe it's better to implement this confirmation in Fkill_buffer
> instead of the hook `kill-buffer-query-functions'?

That's pretty much the original question (modulo a few trips we made around
Robinson's barn).

I don't think things should be hard-coded in `kill-buffer'. It's especially not
great to hard-code such stuff in C code.

This is the kind of thing for which it's good to both (a) provide reasonable
default behavior and (b) make it easy for users to change/override that
behavior. IOW, it's fine to do something smart here, but that should not be
hard-coded.

I suggested a separate option for identifying buffers for `kill-buffer'
confirmation query. That's one possibility. That is similar to
`kill-buffer-query-functions', but it is more specifically a list of buffer
names or name patterns. The confirmation behavior itself is already defined; all
we need additionally is to identify the buffers that require it. IOW,
`kill-buffer-query-functions' could be overkill here.

We could also make `kill-buffer-query-functions' a user option (i.e.,
customizable), and give it a default value that provides the behavior you
suggested.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]