Subject: bug#67355: [PATCH] Add doc string to simple.el

From: Jeremy Bryant <[email-masked]>
Date: Wed, 22 Nov 2023 22:23:37 +0000

>
>>  (defun kill-buffer--possibly-save (buffer)
>> +  "Prompt user whether to kill BUFFER, possibly saving it first.
>> +
>> +This assumes the buffer is known to be modified."
>
> This prefers the description of what function does to describing its
> role.  I think it is better to do the opposite:
>
>     Ask the user to confirm killing of a modified BUFFER.
>
>   If the user confirms, optionally save BUFFER that is about to be
>   killed.

Style noted, revised patch attached.

>From 66175becbcd074333b1cd72e033b54a2c3ca061c Mon Sep 17 00:00:00 2001
From: Jeremy Bryant <[email-masked]>
Date: Tue, 21 Nov 2023 23:27:44 +0000
Subject: [PATCH] Add doc string to simple.el

* lisp/simple.el (kill-buffer--possibly-save): Add doc string.
---
 lisp/simple.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/simple.el b/lisp/simple.el
index b770d9d7d33..9ef348f74dc 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -10863,6 +10863,10 @@ scratch-buffer
   (pop-to-buffer-same-window (get-scratch-buffer-create)))
 
 (defun kill-buffer--possibly-save (buffer)
+  "Ask the user to confirm killing of a modified BUFFER.
+
+If the user confirms, optionally save BUFFER that is about to be
+killed."
   (let ((response
          (cadr
           (read-multiple-choice
-- 
2.40.1