From unknown Thu Sep 11 06:07:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50303: Add interlinks to docstrings of inverse abbrev Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Aug 2021 17:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50303 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 50303@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163042916130841 (code B ref -1); Tue, 31 Aug 2021 17:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 31 Aug 2021 16:59:21 +0000 Received: from localhost ([127.0.0.1]:35325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL76X-00081N-5D for submit@debbugs.gnu.org; Tue, 31 Aug 2021 12:59:21 -0400 Received: from lists.gnu.org ([209.51.188.17]:47956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL76S-00081C-Rp for submit@debbugs.gnu.org; Tue, 31 Aug 2021 12:59:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mL76R-0004qR-5k for bug-gnu-emacs@gnu.org; Tue, 31 Aug 2021 12:59:16 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:52143) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mL76N-0003xh-FH for bug-gnu-emacs@gnu.org; Tue, 31 Aug 2021 12:59:14 -0400 Received: (Authenticated sender: juri@linkov.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id B50D7FF803 for ; Tue, 31 Aug 2021 16:59:06 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET Date: Tue, 31 Aug 2021 19:45:32 +0300 Message-ID: <87tuj5shs3.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/x-diff Content-Disposition: inline; filename=abbrev-docstrings.patch Received-SPF: pass client-ip=217.70.183.199; envelope-from=juri@linkov.net; helo=relay9-d.mail.gandi.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) 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: -2.6 (--) diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 54783db2c3..0d754cc9cf 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -287,6 +287,7 @@ add-mode-abbrev or zero means the region is the expansion. A negative argument means to undefine the specified abbrev. Reads the abbreviation in the minibuffer. +You can also use the opposite command `inverse-add-mode-abbrev'. Don't use this function in a Lisp program; use `define-abbrev' instead." (interactive "p") @@ -303,6 +304,7 @@ add-global-abbrev expansion; or zero means the region is the expansion. A negative argument means to undefine the specified abbrev. This command uses the minibuffer to read the abbreviation. +You can also use the opposite command `inverse-add-global-abbrev'. Don't use this function in a Lisp program; use `define-abbrev' instead." (interactive "p") @@ -330,7 +332,8 @@ inverse-add-mode-abbrev "Define last word before point as a mode-specific abbrev. With prefix argument N, defines the Nth word before point. This command uses the minibuffer to read the expansion. -Expands the abbreviation after defining it." +Expands the abbreviation after defining it. +You can also use the opposite command `add-mode-abbrev'." (interactive "p") (inverse-add-abbrev (if only-global-abbrevs @@ -343,7 +346,8 @@ inverse-add-global-abbrev "Define last word before point as a global (mode-independent) abbrev. With prefix argument N, defines the Nth word before point. This command uses the minibuffer to read the expansion. -Expands the abbreviation after defining it." +Expands the abbreviation after defining it. +You can also use the opposite command `add-global-abbrev'." (interactive "p") (inverse-add-abbrev global-abbrev-table "Global" n)) From unknown Thu Sep 11 06:07:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50303: Add interlinks to docstrings of inverse abbrev Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Aug 2021 17:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50303 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 50303@debbugs.gnu.org Received: via spool by 50303-submit@debbugs.gnu.org id=B50303.16304316502314 (code B ref 50303); Tue, 31 Aug 2021 17:41:02 +0000 Received: (at 50303) by debbugs.gnu.org; 31 Aug 2021 17:40:50 +0000 Received: from localhost ([127.0.0.1]:35335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL7kc-0000b7-Ba for submit@debbugs.gnu.org; Tue, 31 Aug 2021 13:40:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL7kW-0000aq-OH for 50303@debbugs.gnu.org; Tue, 31 Aug 2021 13:40:44 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47176) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mL7kR-0004IL-9K; Tue, 31 Aug 2021 13:40:35 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4485 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mL7kQ-00044r-Sw; Tue, 31 Aug 2021 13:40:35 -0400 Date: Tue, 31 Aug 2021 20:40:27 +0300 Message-Id: <837dg1seb8.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87tuj5shs3.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 31 Aug 2021 19:45:32 +0300) References: <87tuj5shs3.fsf@mail.linkov.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: Juri Linkov > Date: Tue, 31 Aug 2021 19:45:32 +0300 > > diff --git a/lisp/abbrev.el b/lisp/abbrev.el > index 54783db2c3..0d754cc9cf 100644 > --- a/lisp/abbrev.el > +++ b/lisp/abbrev.el > @@ -287,6 +287,7 @@ add-mode-abbrev > or zero means the region is the expansion. > A negative argument means to undefine the specified abbrev. > Reads the abbreviation in the minibuffer. > +You can also use the opposite command `inverse-add-mode-abbrev'. Thanks, but I think "you can also use" is not the best text here. It could be interpreted to mean that the other command does something similar, which is not true, and contradicts the "opposite" part. This makes the text confusing. How about saying explicitly what that command does. For example: To define expansion for the word at point, use `inverse-add-mode-abbrev'. And similarly for the other doc strings. From unknown Thu Sep 11 06:07:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50303: Add interlinks to docstrings of inverse abbrev Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Aug 2021 18:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50303 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 50303@debbugs.gnu.org Received: via spool by 50303-submit@debbugs.gnu.org id=B50303.16304341446302 (code B ref 50303); Tue, 31 Aug 2021 18:23:02 +0000 Received: (at 50303) by debbugs.gnu.org; 31 Aug 2021 18:22:24 +0000 Received: from localhost ([127.0.0.1]:35366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL8Ou-0001da-Fw for submit@debbugs.gnu.org; Tue, 31 Aug 2021 14:22:24 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:51541) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL8Or-0001dJ-TS for 50303@debbugs.gnu.org; Tue, 31 Aug 2021 14:22:22 -0400 Received: (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 5BC88C0007; Tue, 31 Aug 2021 18:22:14 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87tuj5shs3.fsf@mail.linkov.net> <837dg1seb8.fsf@gnu.org> Date: Tue, 31 Aug 2021 21:11:05 +0300 In-Reply-To: <837dg1seb8.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 31 Aug 2021 20:40:27 +0300") Message-ID: <87r1e9mq5q.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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; charset=utf-8 Content-Transfer-Encoding: 8bit >> @@ -287,6 +287,7 @@ add-mode-abbrev >> +You can also use the opposite command `inverse-add-mode-abbrev'. > > Thanks, but I think "you can also use" is not the best text here. It > could be interpreted to mean that the other command does something > similar, which is not true, and contradicts the "opposite" part. > This makes the text confusing. > > How about saying explicitly what that command does. For example: > > To define expansion for the word at point, use `inverse-add-mode-abbrev'. > > And similarly for the other doc strings. The intention was to indicate that these are opposite commands. A good explanation is in (info "(emacs) Defining Abbrevs"): ‘C-x a i g’ (‘inverse-add-global-abbrev’) and ‘C-x a i l’ (‘inverse-add-mode-abbrev’) perform the opposite task: if the abbrev text is already in the buffer, you use these commands to define an abbrev by specifying the expansion in the minibuffer. These commands will expand the abbrev text used for the definition. Also to reduce confusion, to explicitly mention what another command does: 1. the abbrev is in the buffer, read the expansion from the minibuffer 2. the expansion is in the buffer, read the abbrev from the minibuffer So maybe this patch is better: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=abbrev-docstrings-2.patch diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 54783db2c3..74c9a49b3b 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -288,6 +288,9 @@ add-mode-abbrev A negative argument means to undefine the specified abbrev. Reads the abbreviation in the minibuffer. +Instead of this, to read the expansion in the minibuffer +for the abbreviation at point, use `inverse-add-mode-abbrev'. + Don't use this function in a Lisp program; use `define-abbrev' instead." (interactive "p") (add-abbrev @@ -304,6 +307,9 @@ add-global-abbrev A negative argument means to undefine the specified abbrev. This command uses the minibuffer to read the abbreviation. +Instead of this, to read the expansion in the minibuffer +for the abbreviation at point, use `inverse-add-global-abbrev'. + Don't use this function in a Lisp program; use `define-abbrev' instead." (interactive "p") (add-abbrev global-abbrev-table "Global" arg)) @@ -330,7 +336,10 @@ inverse-add-mode-abbrev "Define last word before point as a mode-specific abbrev. With prefix argument N, defines the Nth word before point. This command uses the minibuffer to read the expansion. -Expands the abbreviation after defining it." +Expands the abbreviation after defining it. + +Instead of this, to read the abbreviation in the minibuffer +for the expansion at point, use `add-mode-abbrev'." (interactive "p") (inverse-add-abbrev (if only-global-abbrevs @@ -343,7 +352,10 @@ inverse-add-global-abbrev "Define last word before point as a global (mode-independent) abbrev. With prefix argument N, defines the Nth word before point. This command uses the minibuffer to read the expansion. -Expands the abbreviation after defining it." +Expands the abbreviation after defining it. + +Instead of this, to read the abbreviation in the minibuffer +for the expansion at point, use `add-global-abbrev'." (interactive "p") (inverse-add-abbrev global-abbrev-table "Global" n)) --=-=-=-- From unknown Thu Sep 11 06:07:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50303: Add interlinks to docstrings of inverse abbrev Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Aug 2021 19:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50303 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 50303@debbugs.gnu.org Received: via spool by 50303-submit@debbugs.gnu.org id=B50303.163043659810316 (code B ref 50303); Tue, 31 Aug 2021 19:04:02 +0000 Received: (at 50303) by debbugs.gnu.org; 31 Aug 2021 19:03:18 +0000 Received: from localhost ([127.0.0.1]:35404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL92U-0002gK-06 for submit@debbugs.gnu.org; Tue, 31 Aug 2021 15:03:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL92S-0002g7-JM for 50303@debbugs.gnu.org; Tue, 31 Aug 2021 15:03:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49300) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mL92M-0001rn-VM; Tue, 31 Aug 2021 15:03:10 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1594 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mL92K-0000n7-E7; Tue, 31 Aug 2021 15:03:10 -0400 Date: Tue, 31 Aug 2021 22:03:04 +0300 Message-Id: <834kb5sahj.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87r1e9mq5q.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 31 Aug 2021 21:11:05 +0300) References: <87tuj5shs3.fsf@mail.linkov.net> <837dg1seb8.fsf@gnu.org> <87r1e9mq5q.fsf@mail.linkov.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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: Juri Linkov > Cc: 50303@debbugs.gnu.org > Date: Tue, 31 Aug 2021 21:11:05 +0300 > > >> +You can also use the opposite command `inverse-add-mode-abbrev'. > > > > Thanks, but I think "you can also use" is not the best text here. It > > could be interpreted to mean that the other command does something > > similar, which is not true, and contradicts the "opposite" part. > > This makes the text confusing. > > > > How about saying explicitly what that command does. For example: > > > > To define expansion for the word at point, use `inverse-add-mode-abbrev'. > > > > And similarly for the other doc strings. > > The intention was to indicate that these are opposite commands. I understand. But "opposite" is not well-defined in this case (it could be a command that UN-defines an abbrev, for instance), and therefore requires a long explanation: > A good explanation is in (info "(emacs) Defining Abbrevs"): > > ‘C-x a i g’ (‘inverse-add-global-abbrev’) and ‘C-x a i l’ > (‘inverse-add-mode-abbrev’) perform the opposite task: if the abbrev > text is already in the buffer, you use these commands to define an > abbrev by specifying the expansion in the minibuffer. These commands > will expand the abbrev text used for the definition. > > Also to reduce confusion, to explicitly mention what another command does: > > 1. the abbrev is in the buffer, read the expansion from the minibuffer > 2. the expansion is in the buffer, read the abbrev from the minibuffer > > So maybe this patch is better: If you like what the manual says, why not say in the doc string what the manual says, or some simple variant of that? I doubt that you'll be able to come up with a significantly shorter description that is still clear enough. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 01 04:16:20 2021 Received: (at control) by debbugs.gnu.org; 1 Sep 2021 08:16:20 +0000 Received: from localhost ([127.0.0.1]:36196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLLPw-0001Fx-56 for submit@debbugs.gnu.org; Wed, 01 Sep 2021 04:16:20 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLLPk-00011u-Mr for control@debbugs.gnu.org; Wed, 01 Sep 2021 04:16:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=c5ePolfrV+2OLN2WhR2TS4sj6QJ7noOdkVdlen0GMjM=; b=DTEVx20Kv2X8beu44sbtrGR69b +JtFcjX9+bdEmnpCIWjOYWc9H31gCCwultSD0nD3irP2Awm7NYiPa0c71PTNpXlI6xvbbCMpKAg8H kLo8eEBB0x/XyriP6e+Ep++kp/DBnLrXAICend8i3onOGFtL7XDH93MuEtd7uUHc4EnE=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mLLPc-0001DE-Te for control@debbugs.gnu.org; Wed, 01 Sep 2021 10:16:03 +0200 Date: Wed, 01 Sep 2021 10:16:00 +0200 Message-Id: <878s0ghfsv.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #50303 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 50303 + patch quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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 (---) tags 50303 + patch quit From unknown Thu Sep 11 06:07:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50303: Add interlinks to docstrings of inverse abbrev Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Sep 2021 15:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50303 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 50303@debbugs.gnu.org Received: via spool by 50303-submit@debbugs.gnu.org id=B50303.163051115526121 (code B ref 50303); Wed, 01 Sep 2021 15:46:02 +0000 Received: (at 50303) by debbugs.gnu.org; 1 Sep 2021 15:45:55 +0000 Received: from localhost ([127.0.0.1]:38869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLSR0-0006nE-NH for submit@debbugs.gnu.org; Wed, 01 Sep 2021 11:45:54 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:43517) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLSQz-0006mz-BK for 50303@debbugs.gnu.org; Wed, 01 Sep 2021 11:45:53 -0400 Received: (Authenticated sender: juri@linkov.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id C066720000D; Wed, 1 Sep 2021 15:45:46 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87tuj5shs3.fsf@mail.linkov.net> <837dg1seb8.fsf@gnu.org> <87r1e9mq5q.fsf@mail.linkov.net> <834kb5sahj.fsf@gnu.org> Date: Wed, 01 Sep 2021 18:37:13 +0300 In-Reply-To: <834kb5sahj.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 31 Aug 2021 22:03:04 +0300") Message-ID: <87tuj448q6.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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; charset=utf-8 Content-Transfer-Encoding: 8bit >> A good explanation is in (info "(emacs) Defining Abbrevs"): >> >> ‘C-x a i g’ (‘inverse-add-global-abbrev’) and ‘C-x a i l’ >> (‘inverse-add-mode-abbrev’) perform the opposite task: if the abbrev >> text is already in the buffer, you use these commands to define an >> abbrev by specifying the expansion in the minibuffer. These commands >> will expand the abbrev text used for the definition. > > If you like what the manual says, why not say in the doc string what > the manual says, or some simple variant of that? I doubt that you'll > be able to come up with a significantly shorter description that is > still clear enough. So here it uses the text copied from the manual: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=abbrev-docstrings-3.patch diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 54783db2c3..5b3804a006 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -288,6 +288,10 @@ add-mode-abbrev A negative argument means to undefine the specified abbrev. Reads the abbreviation in the minibuffer. +`inverse-add-mode-abbrev' performs the opposite task: if the abbrev +text is already in the buffer, use this command to define an abbrev +by specifying the expansion in the minibuffer. + Don't use this function in a Lisp program; use `define-abbrev' instead." (interactive "p") (add-abbrev @@ -304,6 +308,10 @@ add-global-abbrev A negative argument means to undefine the specified abbrev. This command uses the minibuffer to read the abbreviation. +`inverse-add-global-abbrev' performs the opposite task: if the abbrev +text is already in the buffer, use this command to define an abbrev +by specifying the expansion in the minibuffer. + Don't use this function in a Lisp program; use `define-abbrev' instead." (interactive "p") (add-abbrev global-abbrev-table "Global" arg)) @@ -330,7 +338,11 @@ inverse-add-mode-abbrev "Define last word before point as a mode-specific abbrev. With prefix argument N, defines the Nth word before point. This command uses the minibuffer to read the expansion. -Expands the abbreviation after defining it." +Expands the abbreviation after defining it. + +`add-mode-abbrev' performs the opposite task: if the expansion +is already in the buffer, use this command to define an abbrev +by specifying the abbrev in the minibuffer." (interactive "p") (inverse-add-abbrev (if only-global-abbrevs @@ -343,7 +355,11 @@ inverse-add-global-abbrev "Define last word before point as a global (mode-independent) abbrev. With prefix argument N, defines the Nth word before point. This command uses the minibuffer to read the expansion. -Expands the abbreviation after defining it." +Expands the abbreviation after defining it. + +`add-global-abbrev' performs the opposite task: if the expansion +is already in the buffer, use this command to define an abbrev +by specifying the abbrev in the minibuffer." (interactive "p") (inverse-add-abbrev global-abbrev-table "Global" n)) --=-=-=-- From unknown Thu Sep 11 06:07:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50303: Add interlinks to docstrings of inverse abbrev Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Sep 2021 16:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50303 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Juri Linkov Cc: 50303@debbugs.gnu.org Received: via spool by 50303-submit@debbugs.gnu.org id=B50303.163051252928714 (code B ref 50303); Wed, 01 Sep 2021 16:09:02 +0000 Received: (at 50303) by debbugs.gnu.org; 1 Sep 2021 16:08:49 +0000 Received: from localhost ([127.0.0.1]:38906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLSnB-0007T4-8o for submit@debbugs.gnu.org; Wed, 01 Sep 2021 12:08:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44094) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLSn9-0007Sq-Ow for 50303@debbugs.gnu.org; Wed, 01 Sep 2021 12:08:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55418) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLSn4-00037j-BH; Wed, 01 Sep 2021 12:08:42 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4135 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLSn3-00044b-UR; Wed, 01 Sep 2021 12:08:42 -0400 Date: Wed, 01 Sep 2021 19:08:40 +0300 Message-Id: <83wno0p9br.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87tuj448q6.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 01 Sep 2021 18:37:13 +0300) References: <87tuj5shs3.fsf@mail.linkov.net> <837dg1seb8.fsf@gnu.org> <87r1e9mq5q.fsf@mail.linkov.net> <834kb5sahj.fsf@gnu.org> <87tuj448q6.fsf@mail.linkov.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: Juri Linkov > Cc: 50303@debbugs.gnu.org > Date: Wed, 01 Sep 2021 18:37:13 +0300 > > > If you like what the manual says, why not say in the doc string what > > the manual says, or some simple variant of that? I doubt that you'll > > be able to come up with a significantly shorter description that is > > still clear enough. > > So here it uses the text copied from the manual: Thanks, I think this is very good, but I'd like to suggest a minor stylistic improvement: > +`inverse-add-mode-abbrev' performs the opposite task: if the abbrev I would begin this by saying See also `inverse-add-mode-abbrev', which performs the opposite task: ... From unknown Thu Sep 11 06:07:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50303: Add interlinks to docstrings of inverse abbrev Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Sep 2021 17:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50303 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 50303@debbugs.gnu.org Received: via spool by 50303-submit@debbugs.gnu.org id=B50303.163060413526974 (code B ref 50303); Thu, 02 Sep 2021 17:36:02 +0000 Received: (at 50303) by debbugs.gnu.org; 2 Sep 2021 17:35:35 +0000 Received: from localhost ([127.0.0.1]:42007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLqcg-00070z-TR for submit@debbugs.gnu.org; Thu, 02 Sep 2021 13:35:35 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:51029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLqcY-00070c-E2; Thu, 02 Sep 2021 13:35:33 -0400 Received: (Authenticated sender: juri@linkov.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id BD111200007; Thu, 2 Sep 2021 17:35:18 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87tuj5shs3.fsf@mail.linkov.net> <837dg1seb8.fsf@gnu.org> <87r1e9mq5q.fsf@mail.linkov.net> <834kb5sahj.fsf@gnu.org> <87tuj448q6.fsf@mail.linkov.net> <83wno0p9br.fsf@gnu.org> Date: Thu, 02 Sep 2021 20:35:05 +0300 In-Reply-To: <83wno0p9br.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 01 Sep 2021 19:08:40 +0300") Message-ID: <878s0eanjq.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain 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 (-) tags 50303 fixed close 50303 28.0.50 quit >> > If you like what the manual says, why not say in the doc string what >> > the manual says, or some simple variant of that? I doubt that you'll >> > be able to come up with a significantly shorter description that is >> > still clear enough. >> >> So here it uses the text copied from the manual: > > Thanks, I think this is very good, but I'd like to suggest a minor > stylistic improvement: > >> +`inverse-add-mode-abbrev' performs the opposite task: if the abbrev > > I would begin this by saying > > See also `inverse-add-mode-abbrev', which performs the opposite > task: ... Now pushed with this text.