[Top][All Lists]

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

RE: C-x C-v considered harmful

From: Bob Rogers
Subject: RE: C-x C-v considered harmful
Date: Sat, 4 Jul 2009 19:16:19 -0400

   From: "Drew Adams" <address@hidden>
   Date: Fri, 3 Jul 2009 15:23:51 -0700

   . . .

   Does `C-x k' warn you the way you would like, when you use it in a *shell*
   buffer?  If not, then that is the problem, not something else.

It does indeed kill the *shell* buffer without prompting, which seems
odd, given that it prompts for modified files.  I notice that this code
uses the C equivalent of "(and (buffer-modified-p) (buffer-file-name))",
though it queries only if interactive, so a case could be made for
dropping the the "(buffer-file-name)" for symmetry.  But I have never
had the problem of invoking "C-x k" by accident (that I recall), so I'm
not sure such a case ought to be made.

   . . .

   And as you mentioned, `find-alternate-file' tests `(and
   (buffer-modified-p) (buffer-file-name))'. I agree with you that the
   problem you are seeing is coming from `(buffer-file-name)' being nil,
   and that removing that might be an improvement.

As far as I am concerned, removing "(buffer-file-name)" would be

   But I am really curious to know why Richard changed this in rev 1.192
to the current (and (buffer-modified-p) (buffer-file-name)) behavior.
Richard, do you remember?  I know this is asking a lot . . .

                                        -- Bob

reply via email to

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