bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#50303: Add interlinks to docstrings of inverse abbrev


From: Juri Linkov
Subject: bug#50303: Add interlinks to docstrings of inverse abbrev
Date: Wed, 01 Sep 2021 18:37:13 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> 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:

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))
 

reply via email to

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