[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24213: 25.1.50; Fishy use of delete-window in register.el
From: |
Andreas Politz |
Subject: |
bug#24213: 25.1.50; Fishy use of delete-window in register.el |
Date: |
Thu, 01 Sep 2016 13:22:08 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
martin rudalics <rudalics@gmx.at> writes:
>> "Exit Finder mode.
>> Delete the window and kill all Finder-related buffers."
>
> Maybe we should say that we "Quit" the window [...]
Yes, I missed that.
>> (interactive)
>> - (ignore-errors (delete-window))
>> + (quit-window)
>> (let ((buf "*Finder*"))
>> (and (get-buffer buf) (kill-buffer buf))))
>
> How about using (quit-window t) right away as in the next case?
The resulting function would be quite murderous and try to kill any
buffer regardless of Finder. I tried to modify the functions semantics
as little as possible. Who knows in what way people are using them,
right ?
>> diff --git a/lisp/image-dired.el b/lisp/image-dired.el
>> index 67b023d..36f148b 100644
>> --- a/lisp/image-dired.el
>> +++ b/lisp/image-dired.el
>> @@ -2445,13 +2445,9 @@ image-dired-gallery-generate
>> (insert "</html>"))))
>>
>> (defun image-dired-kill-buffer-and-window ()
>> - "Kill the current buffer and, if possible, also the window."
>> + "Kill the current buffer and quit it's window."
>
> "its" not "it's".
I think I'm using this false possessive apostrophe for years, without
realizing its ambiguity. Thank you.
More to come.
-ap