From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#55527: 28.1; Clearer abbrev docstrings Date: Thu, 19 May 2022 21:52:27 +0300 Message-ID: <83bkvtcq38.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39711"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55527@debbugs.gnu.org To: Howard Melman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 19 20:53:11 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrlGo-000A6e-9q for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 May 2022 20:53:10 +0200 Original-Received: from localhost ([::1]:44152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrlGm-0000OI-S7 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 May 2022 14:53:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrlGg-0000Nd-9x for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 14:53:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42689) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrlGg-0003SW-1O for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 14:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nrlGf-0001mQ-VN for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 14:53:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 May 2022 18:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55527 X-GNU-PR-Package: emacs Original-Received: via spool by 55527-submit@debbugs.gnu.org id=B55527.16529863606811 (code B ref 55527); Thu, 19 May 2022 18:53:01 +0000 Original-Received: (at 55527) by debbugs.gnu.org; 19 May 2022 18:52:40 +0000 Original-Received: from localhost ([127.0.0.1]:36586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrlGK-0001lm-34 for submit@debbugs.gnu.org; Thu, 19 May 2022 14:52:40 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51050) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrlGI-0001lY-Jd for 55527@debbugs.gnu.org; Thu, 19 May 2022 14:52:39 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33860) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrlGD-0003PT-AC; Thu, 19 May 2022 14:52:33 -0400 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=YR8pPYDTENhg5sOrBtC2TJWgg2BAvrYg/8LeXpsOD4o=; b=jWKW6BJykEus bUMdl1vkiDk+nc9EGgXg3m/kdxf8uXLRO3FhbvmRJnDiQ09cuJQyDlt8VMRET3EeteVDEGEWOioOC Z4nUdgIljISdW/sZWzg3aCDw7q5Ytf3AKGMWf0m2vQkvt8UR9m2MM6Ys7S1pv9rSqWcJ/KgM4jWtl Mo99ikOCbF7cVQEkpv4AE+73Q0Zdk/myodSDKbKHbwaNUtcAvHDp+UwyzOaGuGleIOXIvG6/Rx9bk NexEpUThw05oPyyjpAoqCw3LYVRBYtAdZnfw5wQs3W8dzXj0hyGDcgVS/nF6unnXNf1G8LvcRwL40 hrYaNY8vNhTFKJVKWDXVFQ==; Original-Received: from [87.69.77.57] (port=3702 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 1nrlGC-0008UJ-P4; Thu, 19 May 2022 14:52:33 -0400 In-Reply-To: (message from Howard Melman on Thu, 19 May 2022 14:32:44 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:232662 Archived-At: > From: Howard Melman > Date: Thu, 19 May 2022 14:32:44 -0400 > > Define global (all modes) abbrev for last word(s) before point. > Define last word before point as a global (mode-independent) abbrev. > > and I find I have to think hard to resolve which is which. I > think these would be clearer: > > Use word(s) before point as the expansion of a new global abbrev. "Use" is ambiguous, because it may be interpreted as "expand it now". "Define" is better. So I would suggest Define a global abbrev that expands into word(s) preceding point. > Use word before point as the abbreviation of a new global abbrev. "Abbreviation of a new abbrev" is confusing. I don't actually understand what's wrong with the original one, viz.: Define last word before point as a global (mode-independent) abbrev. > Define word before point as a global abbrev, prompt for its expansion. > > FWIW I do wish the documentation used "abbreviation" when it refers to > the abbrev so that "abbrev" could refer to the pair of "abbreviation" > and "expansion" or to the feature name. That'd be counter-productive, because it will cause these doc strings become longer and more confusing. > Global abbrev for "foo": > Global expansion for "foo": > > The latter is fine but the first confuses me (particularly > when defining one word expansions), I think these would be > clearer as: > > Global abbrev for expansion "foo": > Global expansion of abbrev "foo": Is that really more clear? I would say Global abbrev that expands into "foo": Expansion for a global abbrev "foo": But I'm not sure we can make these prompts so much longer than the original ones without overflowing the minibuffer into a second line, which is a disadvantage. > (defun define-abbrev (table name expansion &optional hook &rest props) > "Define an abbrev in TABLE named NAME, to expand to EXPANSION and call HOOK. > > to this: > > (defun define-abbrev (table abbrev expansion &optional hook &rest props) > "Define in TABLE an ABBREV and its EXPANSION and optionally a HOOK. This loses the explanation of what is HOOK, and is also a very awkward sentence that I think will be hard on non-native English speakers.