From unknown Thu Jul 24 17:38:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67355: [PATCH] Add doc string to simple.el Resent-From: Jeremy Bryant Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Nov 2023 23:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67355 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 67355@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17006097259848 (code B ref -1); Tue, 21 Nov 2023 23:36:01 +0000 Received: (at submit) by debbugs.gnu.org; 21 Nov 2023 23:35:25 +0000 Received: from localhost ([127.0.0.1]:57683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5aH7-0002Ym-11 for submit@debbugs.gnu.org; Tue, 21 Nov 2023 18:35:25 -0500 Received: from lists.gnu.org ([2001:470:142::17]:42320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5aGr-0002YF-1B for submit@debbugs.gnu.org; Tue, 21 Nov 2023 18:35:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r5aGi-0006mN-CO for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 18:35:00 -0500 Received: from out-188.mta1.migadu.com ([95.215.58.188]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r5aGg-0000OU-Be for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 18:35:00 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net; s=key1; t=1700609695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=UgeRtwEtNb0qjXnnMF/C97yLvN0/+VIMS+5xi/cOSZk=; b=HWROTn0E3XsmxRJHjX76OLWo8lsRkuvmiAFmM0/Qyy7Dr0nLk5m0fQZy7JsB6WYu/BsVHm OwyApbHyWojZiblkZscc8a/yVZYnX15aX06+Zuuwo6uoiTUZPmDJE9oYxRg6iJWK1O6nFk /d5NPpnmNRAT8C8KEks5omDqagK9fycDe2DyxvtnKa15OOZL3C7PYN0qVIOHoLY+G88cxf sKEc/txoF032as7OmSPXUz9iZuHNppBItkEj+zpmGc537voSmvn+HkN+Eh1Rm+1iQb+IB7 Q7nR5iF53TNtPs43Jay0i58Hh8Jl9csVTEZYAD9em6XNU2tVpIQY1H9rfj7V0A== From: Jeremy Bryant Date: Tue, 21 Nov 2023 23:33:50 +0000 Message-ID: <87r0kiel47.fsf@jeremybryant.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=95.215.58.188; envelope-from=jb@jeremybryant.net; helo=out-188.mta1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) --=-=-= Content-Type: text/plain Tags: patch This patch adds a doc string to simple.el where there was none. Please confirm if this is good to install or if any refinements are needed. Thanks in advance. --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Add-doc-string-to-simple.el.patch >From 2ca9dab72f2aacb51e0b3d6d6403c4659e168fb9 Mon Sep 17 00:00:00 2001 From: Jeremy Bryant 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/simple.el b/lisp/simple.el index b770d9d7d33..69d29bc306b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -10863,6 +10863,9 @@ scratch-buffer (pop-to-buffer-same-window (get-scratch-buffer-create))) (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." (let ((response (cadr (read-multiple-choice -- 2.40.1 --=-=-=-- From unknown Thu Jul 24 17:38:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67355: [PATCH] Add doc string to simple.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Nov 2023 14:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67355 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Jeremy Bryant Cc: 67355@debbugs.gnu.org Received: via spool by 67355-submit@debbugs.gnu.org id=B67355.170066338415401 (code B ref 67355); Wed, 22 Nov 2023 14:30:02 +0000 Received: (at 67355) by debbugs.gnu.org; 22 Nov 2023 14:29:44 +0000 Received: from localhost ([127.0.0.1]:58472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5oEZ-00040K-I1 for submit@debbugs.gnu.org; Wed, 22 Nov 2023 09:29:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5oEY-0003zs-7i for 67355@debbugs.gnu.org; Wed, 22 Nov 2023 09:29:42 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r5oEN-0004K5-Az; Wed, 22 Nov 2023 09:29:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=/vCweKNqQ0pG9epCTZY8GKqWxbJVRAIgKWhlC50gnqI=; b=gGSChmF5zFYD jsU1V3maM8FAePKUKrrQ87xQaXyVRhQrnfpDqMAd9jmzShfnI3xwC6R0ke03Y0k7GwkqkMgYEvGTH qVrdRna66Ju/sU2uYc++RsW3nGnI/N3WAkpJFlgOFYo1RYLm0Yly7zxw0hcyyCC06xloJj54GzQ6D 1lsl1jPhWcGvVunjEgOWmjU5twsgMbBmVmXPhbBOSDAvc14PHTTTnF5ILl9PeciOnllArZscT41G4 +R1yBT0q0/q/8w3MEwSwm9LelpsbezCIjXyn11bl4vHcQfpKFXP2CoTKPbeW9gnMwif6DgOA/PNBp chqptF9on7b5Y9R55CNQLw==; Date: Wed, 22 Nov 2023 16:29:21 +0200 Message-Id: <83o7flhnem.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87r0kiel47.fsf@jeremybryant.net> (bug-gnu-emacs@gnu.org) References: <87r0kiel47.fsf@jeremybryant.net> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Tue, 21 Nov 2023 23:33:50 +0000 > From: Jeremy Bryant via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > This patch adds a doc string to simple.el where there was none. Thanks. > Please confirm if this is good to install or if any refinements are > needed. Thanks in advance. Below. > (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. From unknown Thu Jul 24 17:38:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67355: [PATCH] Add doc string to simple.el Resent-From: Jeremy Bryant Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Nov 2023 22:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67355 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 67355@debbugs.gnu.org Received: via spool by 67355-submit@debbugs.gnu.org id=B67355.17006918882832 (code B ref 67355); Wed, 22 Nov 2023 22:25:01 +0000 Received: (at 67355) by debbugs.gnu.org; 22 Nov 2023 22:24:48 +0000 Received: from localhost ([127.0.0.1]:60015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5veJ-0000jb-OM for submit@debbugs.gnu.org; Wed, 22 Nov 2023 17:24:48 -0500 Received: from out-170.mta1.migadu.com ([2001:41d0:203:375::aa]:28859) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5veG-0000jR-Dl for 67355@debbugs.gnu.org; Wed, 22 Nov 2023 17:24:45 -0500 References: <87r0kiel47.fsf@jeremybryant.net> <83o7flhnem.fsf@gnu.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net; s=key1; t=1700691879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nB5GTkM90hOAGhFxkzNh/EUUk5bkj1+LBgm5gixvNok=; b=kiEfUlTfdAs46BHdL/ubKccoiSyIpNVMXF4yJ2LL/8R60QLl5k11rvnCgQClIsnLY0sDpL IegS+o6E3FBvz1Um2ONRX/iIIOGGtNhI3SoZq/6M+wEespWFHHNBFppcrXiHZtBVaSeewn KB0mePdXkRuDy/aLrYrdbNl3okTnUpK4eQJbjHFGSwa6NXkTebEkyjylB9s6FGmNm/HmYA FU8L0lp8It+205/3Em0GplIm4L9uhtJA0Ec5R2Ikygm8siVZaqArH/21alUAe3PrFDyquD sDAHL318pTkjLSh9/IbMeu+irlT+nBcsI/fPZ8CpP0vwOKqyo6tcpcEHgLs9GA== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Jeremy Bryant Date: Wed, 22 Nov 2023 22:23:37 +0000 In-reply-to: <83o7flhnem.fsf@gnu.org> Message-ID: <87msv5e89n.fsf@jeremybryant.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain > >> (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. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Add-doc-string-to-simple.el.patch >From 66175becbcd074333b1cd72e033b54a2c3ca061c Mon Sep 17 00:00:00 2001 From: Jeremy Bryant 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 --=-=-=-- From unknown Thu Jul 24 17:38:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67355: Maybe update manual - Re: bug#67355: [PATCH] Add doc string to simple.el Resent-From: Jeremy Bryant Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Nov 2023 22:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67355 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 67355@debbugs.gnu.org Received: via spool by 67355-submit@debbugs.gnu.org id=B67355.17006927074204 (code B ref 67355); Wed, 22 Nov 2023 22:39:02 +0000 Received: (at 67355) by debbugs.gnu.org; 22 Nov 2023 22:38:27 +0000 Received: from localhost ([127.0.0.1]:60021 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5vrX-00015k-6V for submit@debbugs.gnu.org; Wed, 22 Nov 2023 17:38:27 -0500 Received: from out-187.mta0.migadu.com ([91.218.175.187]:63431) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5vrU-00015a-RL for 67355@debbugs.gnu.org; Wed, 22 Nov 2023 17:38:26 -0500 References: <87r0kiel47.fsf@jeremybryant.net> <83o7flhnem.fsf@gnu.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net; s=key1; t=1700692700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IWme7VjWHl35oCrpfyl8vYi5MVODg31rH++mENgdlGE=; b=UCHwJP5Ms2v+CBvNc8sYVtkf/KrEdB41FLoc/NSfej5/SaHZgY9O+w1nz6kD7xr5wUq0ZG Y7CRnhnyb57zPeGMFr1isKzIl4Y2M2VRQYY86QsTE7xwi2J9ERo5+5vFACUtq6tCnEGx5h NCxIPemSfrRq/VkW00pCfM7sR9w1ez43YDtYF5eOcWAgZHAzr/pPa83frhqx9HPpQ9j1K1 3mm2NgTdA9mlfm1XnPrSzfjPxNf7oIwqDrsWpCdKfAZr+fwsHcQT+svRQ/SKrAT1r1zGf6 GH8r+pVXyuJylkYPyhRmAe3zWhWfM+Knc0MqIT99wRqLpzohN//nJRLsonjcPA== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Jeremy Bryant Date: Wed, 22 Nov 2023 22:33:17 +0000 In-reply-to: <83o7flhnem.fsf@gnu.org> Message-ID: <87fs0xe7mv.fsf@jeremybryant.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > >> (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. Is there any issue with a potential update to the manual at (elisp) Documentation Tips, by adding a line to reflect this tip? Let me know and I can prepare a separate patch. From: For a function, the first line should briefly answer the question, =E2=80=9CWhat does this function do?=E2=80=9D For a variable, the firs= t line should briefly answer the question, =E2=80=9CWhat does this value mean?=E2=80= =9D Don=E2=80=99t limit the documentation string to one line; use as many = lines as you need to explain the details of how to use the function or variable. Please use complete sentences for the rest of the text too. To: For a function, the first line should briefly answer the question, =E2=80=9CWhat does this function do?=E2=80=9D For a variable, the firs= t line should briefly answer the question, =E2=80=9CWhat does this value mean?=E2=80= =9D Don=E2=80=99t limit the documentation string to one line; use as many = lines as you need to explain the details of how to use the function or variable. Please use complete sentences for the rest of the text too. + In the longer description, prefer describing the role of a function + as opposed to strictly what it does. From unknown Thu Jul 24 17:38:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67355: Maybe update manual - Re: bug#67355: [PATCH] Add doc string to simple.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Nov 2023 15:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67355 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Jeremy Bryant Cc: 67355@debbugs.gnu.org Received: via spool by 67355-submit@debbugs.gnu.org id=B67355.170075325610254 (code B ref 67355); Thu, 23 Nov 2023 15:28:01 +0000 Received: (at 67355) by debbugs.gnu.org; 23 Nov 2023 15:27:36 +0000 Received: from localhost ([127.0.0.1]:34692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6Bc8-0002fJ-GR for submit@debbugs.gnu.org; Thu, 23 Nov 2023 10:27:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6Bc6-0002f6-Qt for 67355@debbugs.gnu.org; Thu, 23 Nov 2023 10:27:35 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r6Bbx-00079z-H8; Thu, 23 Nov 2023 10:27:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=z/Fs2yoacemDVB5XbPIyp4XCgfPq4m/fkRLtBqNnsLI=; b=amb+CjYtBl+p jaC4q1VRWryeQyh+uEclCJ+dqPh6ikonj5RnCHNV1yLt/PzlUoU9KgOu2E3VrgZLhB5BQ9+yG3XYY nu3L7fNucnRK/CpxRPut2YlUpxJ6HAGGX+VelYl9G+bh/WYH6C0QdLO2vNrVq6ecfGnYhJzxEDrYO GbhL/7ddmehgWEhjALhupZzNDQ15mhYV929BNT7ouMVhUxWmnDvu4Kn1UJCF5MmBZfFx9EHfVF0wJ kYHBWpOw3AA5jTWEu7ZtBdS0rbJNhlDPQI9x8OXEHFQeUjm2DwKUJu2eVQCaRZEiq66XCAICCzx2G C80BQ/ebHm0CiSlkhPg1Mw==; Date: Thu, 23 Nov 2023 17:27:17 +0200 Message-Id: <83r0kgfq22.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87fs0xe7mv.fsf@jeremybryant.net> (message from Jeremy Bryant on Wed, 22 Nov 2023 22:33:17 +0000) References: <87r0kiel47.fsf@jeremybryant.net> <83o7flhnem.fsf@gnu.org> <87fs0xe7mv.fsf@jeremybryant.net> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Jeremy Bryant > Cc: 67355@debbugs.gnu.org > Date: Wed, 22 Nov 2023 22:33:17 +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. > > Is there any issue with a potential update to the manual at (elisp) > Documentation Tips, by adding a line to reflect this tip? Let me know > and I can prepare a separate patch. I added there something similar to your suggestion. Thanks. From unknown Thu Jul 24 17:38:34 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Jeremy Bryant Subject: bug#67355: closed (Re: bug#67355: [PATCH] Add doc string to simple.el) Message-ID: References: <83pm00fpxz.fsf@gnu.org> <87r0kiel47.fsf@jeremybryant.net> X-Gnu-PR-Message: they-closed 67355 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 67355@debbugs.gnu.org Date: Thu, 23 Nov 2023 15:31:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1700753462-10806-1" This is a multi-part message in MIME format... ------------=_1700753462-10806-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #67355: [PATCH] Add doc string to simple.el which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 67355@debbugs.gnu.org. --=20 67355: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D67355 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1700753462-10806-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 67355-done) by debbugs.gnu.org; 23 Nov 2023 15:30:04 +0000 Received: from localhost ([127.0.0.1]:34729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6BeW-0002lx-1T for submit@debbugs.gnu.org; Thu, 23 Nov 2023 10:30:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6BeU-0002kz-73 for 67355-done@debbugs.gnu.org; Thu, 23 Nov 2023 10:30:02 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r6BeK-0007lw-S5; Thu, 23 Nov 2023 10:29:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=n+B+FWmLXqlng75qCkCE0MFcjwXFF0phFFmcPj9JcMY=; b=UR+0BWgz3l/V ajM2b8dGcNuevoGJ9LZNjejrJ+dIfInuzvxZbV6FLViLblz5SWXutW0AvHj3xO9BqSl9BINy9EygL 6LASpqjJyWKDNutiugRIJFeW8rZy/rdh9ZVw7aleEU2cKoP1ml0vAYTm1TyXmGbkKPX22Xz8LkE1M n1NbaZeAXgwXQnAQTlmPOsVlZ5L0xt0RZtTZslJSgzYJfxvTuAkXyB3Dm39RSgqh/F7jkmH/ZckoD YalMMFJtf2YzrxvtOLOM5FZ/swWGTbmXt7+xWoS33FWWBNyDQnxn6yxT96lhxOuE3DOYBUlzftzWQ puGDoBeb4OTEt4dAeLI5Ew==; Date: Thu, 23 Nov 2023 17:29:44 +0200 Message-Id: <83pm00fpxz.fsf@gnu.org> From: Eli Zaretskii To: Jeremy Bryant In-Reply-To: <87msv5e89n.fsf@jeremybryant.net> (message from Jeremy Bryant on Wed, 22 Nov 2023 22:23:37 +0000) Subject: Re: bug#67355: [PATCH] Add doc string to simple.el References: <87r0kiel47.fsf@jeremybryant.net> <83o7flhnem.fsf@gnu.org> <87msv5e89n.fsf@jeremybryant.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67355-done Cc: 67355-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Jeremy Bryant > Cc: 67355@debbugs.gnu.org > Date: Wed, 22 Nov 2023 22:23:37 +0000 > > Style noted, revised patch attached. Thanks, installed on the emacs-29 branch, and closing the bug. ------------=_1700753462-10806-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 21 Nov 2023 23:35:25 +0000 Received: from localhost ([127.0.0.1]:57683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5aH7-0002Ym-11 for submit@debbugs.gnu.org; Tue, 21 Nov 2023 18:35:25 -0500 Received: from lists.gnu.org ([2001:470:142::17]:42320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5aGr-0002YF-1B for submit@debbugs.gnu.org; Tue, 21 Nov 2023 18:35:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r5aGi-0006mN-CO for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 18:35:00 -0500 Received: from out-188.mta1.migadu.com ([95.215.58.188]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r5aGg-0000OU-Be for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 18:35:00 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net; s=key1; t=1700609695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=UgeRtwEtNb0qjXnnMF/C97yLvN0/+VIMS+5xi/cOSZk=; b=HWROTn0E3XsmxRJHjX76OLWo8lsRkuvmiAFmM0/Qyy7Dr0nLk5m0fQZy7JsB6WYu/BsVHm OwyApbHyWojZiblkZscc8a/yVZYnX15aX06+Zuuwo6uoiTUZPmDJE9oYxRg6iJWK1O6nFk /d5NPpnmNRAT8C8KEks5omDqagK9fycDe2DyxvtnKa15OOZL3C7PYN0qVIOHoLY+G88cxf sKEc/txoF032as7OmSPXUz9iZuHNppBItkEj+zpmGc537voSmvn+HkN+Eh1Rm+1iQb+IB7 Q7nR5iF53TNtPs43Jay0i58Hh8Jl9csVTEZYAD9em6XNU2tVpIQY1H9rfj7V0A== From: Jeremy Bryant To: bug-gnu-emacs@gnu.org Subject: [PATCH] Add doc string to simple.el Date: Tue, 21 Nov 2023 23:33:50 +0000 Message-ID: <87r0kiel47.fsf@jeremybryant.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=95.215.58.188; envelope-from=jb@jeremybryant.net; helo=out-188.mta1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) --=-=-= Content-Type: text/plain Tags: patch This patch adds a doc string to simple.el where there was none. Please confirm if this is good to install or if any refinements are needed. Thanks in advance. --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Add-doc-string-to-simple.el.patch >From 2ca9dab72f2aacb51e0b3d6d6403c4659e168fb9 Mon Sep 17 00:00:00 2001 From: Jeremy Bryant 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/simple.el b/lisp/simple.el index b770d9d7d33..69d29bc306b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -10863,6 +10863,9 @@ scratch-buffer (pop-to-buffer-same-window (get-scratch-buffer-create))) (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." (let ((response (cadr (read-multiple-choice -- 2.40.1 --=-=-=-- ------------=_1700753462-10806-1--