GNU bug report logs - #44328
27.1; [PATCH] Add expand-abbrev-maybe condition key binding

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Zhu Zihao <all_but_last@HIDDEN>; Keywords: patch; dated Fri, 30 Oct 2020 14:49:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 44328 <at> debbugs.gnu.org:


Received: (at 44328) by debbugs.gnu.org; 2 Nov 2020 15:30:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 02 10:30:20 2020
Received: from localhost ([127.0.0.1]:42168 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kZbmm-0002yi-AL
	for submit <at> debbugs.gnu.org; Mon, 02 Nov 2020 10:30:20 -0500
Received: from quimby.gnus.org ([95.216.78.240]:48330)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1kZbmk-0002yN-Jo
 for 44328 <at> debbugs.gnu.org; Mon, 02 Nov 2020 10:30:19 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=33byhQPMNPU8AuKHbq0o5JsO+dvbOhF247zaBqrHAQI=; b=LFZiJicPdw49bPnGS/lcde9mgY
 xJp1mM9A/76BQpYskiOJMHVpVOwkhbhNmHC7UqImwIhBHjkwoOQhTlC/xdBFt3UYtGr2O22sExL+e
 yrLmZ8ycr3nPIlmwLl2Sep2DWisBwlKFQrbrw+1zz300i36w2RHYY6xL5j9dGHDjGEps=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1kZbmT-0001p3-V0; Mon, 02 Nov 2020 16:30:12 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: "Zhu Zihao" <all_but_last@HIDDEN>
Subject: Re: bug#44328: 27.1; [PATCH] Add expand-abbrev-maybe condition key
 binding
References: <86h7qbdbsv.fsf@HIDDEN> <87v9ep9msu.fsf@HIDDEN>
 <33826ad9.44e2.1758779a4c1.Coremail.all_but_last@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEXftaDTkHOeamBJ
 Nj+GeIP///9UTBKyAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+QLAg47MxUkqYoAAAGFSURBVDjLbZQN
 bsMgDIXN1gMAu8Cwd4DVzgGqJfc/055NkkJaS5Uqf/jvGUKU6YNb6VaZuRHs0ygR8QSWG8DNKGeA
 chiAbkSJjUo+MlEHtoFsRvUokSl1sGwPopWYhMOLzFHEPORPqCVB8eytUI9wsAr9VgAEwZ/cD4Bc
 q9E9gGnJpYjtpmKkVVpJYmgAh/2MA7S71BW+KncqTiv3kIjgMKrGLbpyEwDzEg4Uf84yDqquD7QF
 sNppBHfhWlrKtZXbj+gJWH2ukqhy8ol4BNCkhMh9wg4wW8nQD8d9yDoBNwch8BWUWGQdUlmsoxVx
 sGsygsQawJ4gVp5TrP4VIJVcge8iQekQV0bQsHMxe6q+Azhyqu/AXtVFkwmoLyjmuwI+zSYAhdk1
 H/wH8J/YaB2oXtwH6MPzO8DjDCPQqfITaPfKDNhBXI+53e+AjBvOUyo8ppjd7+mYKvuj1iA6RcC+
 /KH4Q7YLwODSk12BR+h0/gTzcAcQ4xcNLT4oS2J+F2G/VF9C/gEWf6lMTPjvrwAAACV0RVh0ZGF0
 ZTpjcmVhdGUAMjAyMC0xMS0wMlQxNDo1OTo1MSswMDowMAfa8TcAAAAldEVYdGRhdGU6bW9kaWZ5
 ADIwMjAtMTEtMDJUMTQ6NTk6NTErMDA6MDB2h0mLAAAAAElFTkSuQmCC
X-Now-Playing: Richard And Linda Thompson's _Pour Down Like Silver_: "Hard
 Luck Stories"
Date: Mon, 02 Nov 2020 16:30:00 +0100
In-Reply-To: <33826ad9.44e2.1758779a4c1.Coremail.all_but_last@HIDDEN> (Zhu
 Zihao's message of "Mon, 2 Nov 2020 13:41:37 +0800 (CST)")
Message-ID: <87r1pb6akn.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
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:  "Zhu Zihao" <all_but_last@HIDDEN> writes: > Actually, it's
 a menu-item definition, described in >
 https://www.gnu.org/software/emacs/manual/html_node/elisp/Extended-Menu-Items.html
 > > It can be bound to a keymap and use it like key bindings, [...] 
 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: 44328
Cc: 44328 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

"Zhu Zihao" <all_but_last@HIDDEN> writes:

> Actually, it's a menu-item definition, described in
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Extended-Menu-Items.html
>
> It can be bound to a keymap and use it like key bindings, it also support some
> dynamic features which normal keybinding can't do, according to manual.

OK, but a normal command would surely make more sense here?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#44328; Package emacs. Full text available.

Message received at 44328 <at> debbugs.gnu.org:


Received: (at 44328) by debbugs.gnu.org; 2 Nov 2020 05:42:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 02 00:42:07 2020
Received: from localhost ([127.0.0.1]:39326 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kZSbW-0004Dp-Mn
	for submit <at> debbugs.gnu.org; Mon, 02 Nov 2020 00:42:07 -0500
Received: from m1368.mail.163.com ([220.181.13.68]:46970)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <all_but_last@HIDDEN>) id 1kZSbT-0004DB-KR
 for 44328 <at> debbugs.gnu.org; Mon, 02 Nov 2020 00:42:05 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com;
 s=s110527; h=Date:From:Subject:MIME-Version:Message-ID; bh=hwso/
 XqGhhd8cFmPh8vP4jkFeamvRHdeQZaa0LBnI3E=; b=ktVhtPj6Ft/62GahXVVoz
 jtynKT1jKYbxOU3zjVk1mpX3+vb34Rseb0Yf8Kjpc+NUvLyI8yCPpvKN+arjcdoJ
 ua6FwSIayUzyAVTp2+7Q0YyYwD+XDiXUyBMB/HG1vjFm34qAIgengKv//2LigjJk
 bNzlXTjyzDnKmxouq4aXJo=
Received: from all_but_last$163.com ( [27.39.89.124] ) by
 ajax-webmail-wmsvr68 (Coremail) ; Mon, 2 Nov 2020 13:41:37 +0800 (CST)
X-Originating-IP: [27.39.89.124]
Date: Mon, 2 Nov 2020 13:41:37 +0800 (CST)
From: "Zhu Zihao" <all_but_last@HIDDEN>
To: "Lars Ingebrigtsen" <larsi@HIDDEN>
Subject: Re:Re: bug#44328: 27.1; [PATCH] Add expand-abbrev-maybe condition
 key binding
X-Priority: 3
X-Mailer: Coremail Webmail Server Version XT5.0.10 build 20190724(ac680a23)
 Copyright (c) 2002-2020 www.mailtech.cn 163com
In-Reply-To: <87v9ep9msu.fsf@HIDDEN>
References: <86h7qbdbsv.fsf@HIDDEN> <87v9ep9msu.fsf@HIDDEN>
X-CM-CTRLDATA: l06hgmZvb3Rlcl9odG09MTg2Mzo1Ng==
Content-Type: multipart/alternative; 
 boundary="----=_Part_63899_614300313.1604295697601"
MIME-Version: 1.0
Message-ID: <33826ad9.44e2.1758779a4c1.Coremail.all_but_last@HIDDEN>
X-Coremail-Locale: zh_CN
X-CM-TRANSID: RMGowAC3vw8jnJ9fiU+3AA--.63207W
X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/xtbCmAnQr1zmU4NR8wACsk
X-Coremail-Antispam: 1U5529EdanIXcx71UUUUU7vcSsGvfC2KfnxnUU==
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 44328
Cc: 44328 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

------=_Part_63899_614300313.1604295697601
Content-Type: text/plain; charset=GBK
Content-Transfer-Encoding: base64

QWN0dWFsbHksIGl0J3MgYSBtZW51LWl0ZW0gZGVmaW5pdGlvbiwgZGVzY3JpYmVkIGluIGh0dHBz
Oi8vd3d3LmdudS5vcmcvc29mdHdhcmUvZW1hY3MvbWFudWFsL2h0bWxfbm9kZS9lbGlzcC9FeHRl
bmRlZC1NZW51LUl0ZW1zLmh0bWwKCgoKSXQgY2FuIGJlIGJvdW5kIHRvIGEga2V5bWFwIGFuZCB1
c2UgaXQgbGlrZSBrZXkgYmluZGluZ3MsIGl0IGFsc28gc3VwcG9ydCBzb21lIGR5bmFtaWMgZmVh
dHVyZXMgd2hpY2ggbm9ybWFsIGtleWJpbmRpbmcgY2FuJ3QgZG8sIGFjY29yZGluZyB0byBtYW51
YWwuCgoKCgoKCgoKCgoKCgoKCgoKCkF0IDIwMjAtMTEtMDEgMjI6MjU6MjEsICJMYXJzIEluZ2Vi
cmlndHNlbiIgPGxhcnNpQGdudXMub3JnPiB3cm90ZToKPlpodSBaaWhhbyA8YWxsX2J1d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GJpbmRpbmcs
IHdoaWNoCj5zaG91bGQgcHJlc3VtYWJseSByZWZlciB0byBhIG5ldyBjb21tYW5kIChpLmUuIGZ1
bmN0aW9uKT8KPgo+LS0gCj4oZG9tZXN0aWMgcGV0cyBvbmx5LCB0aGUgYW50aWRvdGUgZm9yIG92
ZXJkb3NlLCBtaWxrLikKPiAgIGJsb2dneSBibG9nOiBodHRwOi8vbGFycy5pbmdlYnJpZ3RzZW4u
bm8K
------=_Part_63899_614300313.1604295697601
Content-Type: text/html; charset=GBK
Content-Transfer-Encoding: base64

PGRpdiBzdHlsZT0ibGluZS1oZWlnaHQ6MS43O2NvbG9yOiMwMDAwMDA7Zm9udC1zaXplOjE0cHg7
Zm9udC1mYW1pbHk6QXJpYWwiPkFjdHVhbGx5LCBpdCdzIGEgbWVudS1pdGVtIGRlZmluaXRpb24s
IGRlc2NyaWJlZCBpbiBodHRwczovL3d3dy5nbnUub3JnL3NvZnR3YXJlL2VtYWNzL21hbnVhbC9o
dG1sX25vZGUvZWxpc3AvRXh0ZW5kZWQtTWVudS1JdGVtcy5odG1sPGJyPjxkaXYgc3R5bGU9Im1h
cmdpbjogMDsiPjxicj48L2Rpdj48ZGl2IHN0eWxlPSJtYXJnaW46IDA7Ij5JdCBjYW4gYmUgYm91
bmQgdG8gYSBrZXltYXAgYW5kIHVzZSBpdCBsaWtlIGtleSBiaW5kaW5ncywgaXQgYWxzbyBzdXBw
b3J0IHNvbWUgZHluYW1pYyBmZWF0dXJlcyB3aGljaCBub3JtYWwga2V5YmluZGluZyBjYW4ndCBk
bywgYWNjb3JkaW5nIHRvIG1hbnVhbC48YnI+PC9kaXY+PHAgc3R5bGU9Im1hcmdpbjogMDsiPjxi
cj48L3A+PHAgc3R5bGU9Im1hcmdpbjogMDsiPjxicj48L3A+PHAgc3R5bGU9Im1hcmdpbjogMDsi
Pjxicj48L3A+PHAgc3R5bGU9Im1hcmdpbjogMDsiPjxicj48L3A+PGRpdiBzdHlsZT0icG9zaXRp
b246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kaXRpb25h
bCBrZXkgZGVmaW5pdGlvbiBmb3IgYGV4cGFuZC1hYmJyZXYnLgomZ3Q7Jmd0OyArV2hlbiB0aGlz
IHdhcyBib3VuZCwgaXQgd2lsbCBleHBhbmQgYWJicmV2IGF0IHBvaW50IGlmIHRoZXJlJ3JlIGFu
eSBwb3NzaWJsZQomZ3Q7Jmd0OyArYWJicmV2LiIpCiZndDsKJmd0O0knbSBhZnJhaWQgSSBkb24n
dCB1bmRlcnN0YW5kIHRoZSBtZWFuaW5nIG9mIHRoaXMgY29uc3RhbnQsIG9yIHdoYXQgdGhpcwom
Z3Q7aXMgdHJ5aW5nIHRvIGFjaGlldmUuICBZb3UgdGFsayBhYm91dCBhZGRpbmcgYSBuZXcga2V5
IGJpbmRpbmcsIHdoaWNoCiZndDtzaG91bGQgcHJlc3VtYWJseSByZWZlciB0byBhIG5ldyBjb21t
YW5kIChpLmUuIGZ1bmN0aW9uKT8KJmd0OwomZ3Q7LS0gCiZndDsoZG9tZXN0aWMgcGV0cyBvbmx5
LCB0aGUgYW50aWRvdGUgZm9yIG92ZXJkb3NlLCBtaWxrLikKJmd0OyAgIGJsb2dneSBibG9nOiBo
dHRwOi8vbGFycy5pbmdlYnJpZ3RzZW4ubm8KPC9wcmU+PC9kaXY+PGJyPjxicj48c3BhbiB0aXRs
ZT0ibmV0ZWFzZWZvb3RlciI+PHA+Jm5ic3A7PC9wPjwvc3Bhbj4=
------=_Part_63899_614300313.1604295697601--





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#44328; Package emacs. Full text available.

Message received at 44328 <at> debbugs.gnu.org:


Received: (at 44328) by debbugs.gnu.org; 1 Nov 2020 14:25:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 01 09:25:33 2020
Received: from localhost ([127.0.0.1]:36092 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kZEIX-000607-4e
	for submit <at> debbugs.gnu.org; Sun, 01 Nov 2020 09:25:33 -0500
Received: from quimby.gnus.org ([95.216.78.240]:34962)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1kZEIV-0005zs-SZ
 for 44328 <at> debbugs.gnu.org; Sun, 01 Nov 2020 09:25:32 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=ao/0vbIbLrzoFTnunIo09jK1qQ5T1dIyuaS9ca7ZpHw=; b=DyUZw9L1NrhFEoMaH3b9E9ufHv
 gBiIpE50F2fpD0pN6bL2cgNcpVCg/fwKEqnh4BFdlV3EAdIfsrgp5nXBVePT9dR9yJJSK+7E3ud0f
 KYNVHT7icbzyYFixyHUMDrXWnErcTyAl/6oIlilwa7xbH1PHDd/ESqC3CpglT7pKL3O4=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1kZEIM-0000yK-QF; Sun, 01 Nov 2020 15:25:25 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Zhu Zihao <all_but_last@HIDDEN>
Subject: Re: bug#44328: 27.1; [PATCH] Add expand-abbrev-maybe condition key
 binding
References: <86h7qbdbsv.fsf@HIDDEN>
X-Now-Playing: Blaine Reiniger's _Songs From The Rain Palace_: "Pere Lachaise"
Date: Sun, 01 Nov 2020 15:25:21 +0100
In-Reply-To: <86h7qbdbsv.fsf@HIDDEN> (Zhu Zihao's message of "Fri, 30 Oct
 2020 22:32:32 +0800")
Message-ID: <87v9ep9msu.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
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: Zhu Zihao <all_but_last@HIDDEN> writes: > +@vindex
 expand-abbrev-maybe
 > + If you don't want to check expand for every @code{self-insert-command}
 > +like Abbrev mode. There's a variable describing a conditional key
 definition > +You can bin [...] 
 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: 44328
Cc: 44328 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Zhu Zihao <all_but_last@HIDDEN> writes:

> +@vindex expand-abbrev-maybe
> +  If you don't want to check expand for every @code{self-insert-command}
> +like Abbrev mode. There's a variable describing a conditional key definition
> +You can bind it to some key like @kbd{TAB}. It' ll expand abbrev if
> +there's some abbrev at point, and act like usual @kbd{TAB} if there's not.

[...]

> +(defconst expand-abbrev-maybe
> +  '(menu-item "" expand-abbrev
> +    :filter (lambda (cmd) (and (abbrev--before-point) cmd)))
> +  "A conditional key definition for `expand-abbrev'.
> +When this was bound, it will expand abbrev at point if there're any possible
> +abbrev.")

I'm afraid I don't understand the meaning of this constant, or what this
is trying to achieve.  You talk about adding a new key binding, which
should presumably refer to a new command (i.e. function)?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#44328; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 30 Oct 2020 14:48:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 30 10:48:15 2020
Received: from localhost ([127.0.0.1]:59199 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kYVhO-0006L7-Td
	for submit <at> debbugs.gnu.org; Fri, 30 Oct 2020 10:48:15 -0400
Received: from lists.gnu.org ([209.51.188.17]:32868)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <all_but_last@HIDDEN>) id 1kYVhM-0006Kz-VS
 for submit <at> debbugs.gnu.org; Fri, 30 Oct 2020 10:48:13 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54558)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <all_but_last@HIDDEN>)
 id 1kYVhM-0004jL-Kt
 for bug-gnu-emacs@HIDDEN; Fri, 30 Oct 2020 10:48:12 -0400
Received: from mail-m971.mail.163.com ([123.126.97.1]:33020)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <all_but_last@HIDDEN>) id 1kYVhE-0003bC-Iw
 for bug-gnu-emacs@HIDDEN; Fri, 30 Oct 2020 10:48:11 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com;
 s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=iKh1f
 eALUoAO2725E/aiG2xajCsBwZS3BMwyC4xdgZE=; b=PujeA+IYMMPWot3mu7jbA
 FXtrSoVMCoo9MHNwXyv8syXiYTp7+Lo/qiakmPiBsFffkWtcKh2xgJhwsjMyd/Tq
 AgZBbVzm7X/QnzU7OgSmHUTAHqeT4SGN79+TSlG8sJCqoM2oIttFFZP5RA8EoQkf
 /hov3Iqo8TF2ss18w8k6r0=
Received: from asus-laptop (unknown [27.39.88.51])
 by smtp1 (Coremail) with SMTP id GdxpCgC3TLgDJJxfyvVLAA--.16S2;
 Fri, 30 Oct 2020 22:32:35 +0800 (CST)
User-agent: mu4e 1.4.13; emacs 27.1
From: Zhu Zihao <all_but_last@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 27.1; [PATCH] Add expand-abbrev-maybe condition key binding
Date: Fri, 30 Oct 2020 22:32:32 +0800
Message-ID: <86h7qbdbsv.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-CM-TRANSID: GdxpCgC3TLgDJJxfyvVLAA--.16S2
X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73
 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxUcUDJDUUUU
X-Originating-IP: [27.39.88.51]
X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/1tbiTwTNr1sGWSlJOgAAs3
Received-SPF: pass client-ip=123.126.97.1; envelope-from=all_but_last@HIDDEN;
 helo=mail-m971.mail.163.com
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 10:32:39
X-ACL-Warn: Detected OS   = Linux 3.1-3.10
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, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

--=-=-=
Content-Type: text/plain


This patch add expand-abbrev-maybe. A conditional keybinding inspired
from YASnippet.

When bound to something like "TAB", it will expand abbrev if there's
some at point, it will do original binding(e.g. indent) if there's no
abbrev.

This is helpful for somebody doesn't like aggressive expand strategy in
abbrev-mode, but still doesn't want to give a exclusive keybinding for
expand-abbrev.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=0001-Add-conditonal-key-binding-expand-abbrev-maybe.patch

From 3df90b6c045d8f9e5e91890b44a96a9685e872ae Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@HIDDEN>
Date: Fri, 30 Oct 2020 22:24:54 +0800
Subject: [PATCH] Add conditonal key binding expand-abbrev-maybe

A binding which will expand any existing abbrev at point and act like
original keybinding when there's none abbrev at point.

* lisp/abbrev.el (expand-abbrev-maybe): New variable.
* doc/emacs/abbrevs.texi (Abbrev Concepts): New vindex "expand-abbrev-maybe".
---
 doc/emacs/abbrevs.texi | 6 ++++++
 lisp/abbrev.el         | 7 +++++++
 2 files changed, 13 insertions(+)

diff --git a/doc/emacs/abbrevs.texi b/doc/emacs/abbrevs.texi
index e3766aae9e..2d7b4e1698 100644
--- a/doc/emacs/abbrevs.texi
+++ b/doc/emacs/abbrevs.texi
@@ -210,6 +210,12 @@ Expanding Abbrevs
 unexpand-abbrev} to cancel the last expansion without deleting the
 terminating character.
 
+@vindex expand-abbrev-maybe
+  If you don't want to check expand for every @code{self-insert-command}
+like Abbrev mode. There's a variable describing a conditional key definition
+You can bind it to some key like @kbd{TAB}. It' ll expand abbrev if
+there's some abbrev at point, and act like usual @kbd{TAB} if there's not.
+
 @findex expand-region-abbrevs
   @kbd{M-x expand-region-abbrevs} searches through the region for defined
 abbrevs, and for each one found offers to replace it with its expansion.
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index f35c637eed..7d4bb9621f 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -978,6 +978,13 @@ expand-abbrev
       (if abbrev-suggest
           (abbrev--suggest-maybe-suggest))))
 
+(defconst expand-abbrev-maybe
+  '(menu-item "" expand-abbrev
+    :filter (lambda (cmd) (and (abbrev--before-point) cmd)))
+  "A conditional key definition for `expand-abbrev'.
+When this was bound, it will expand abbrev at point if there're any possible
+abbrev.")
+
 (defun abbrev--default-expand ()
   "Default function to use for `abbrev-expand-function'.
 This also respects the obsolete wrapper hook `abbrev-expand-functions'.
-- 
2.29.1


--=-=-=
Content-Type: multipart/signed; boundary="==-=-=";
	micalg=pgp-sha256; protocol="application/pgp-signature"

--==-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable


=2D-=20
Retrieve my PGP public key: https://meta.sr.ht/~citreu.pgp

Zihao

--==-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQFJBAEBCAAzFiEE7NCVzXX6efyusptG1SOVn+xGFqYFAl+cJAAVHGFsbF9idXRf
bGFzdEAxNjMuY29tAAoJENUjlZ/sRhamxAAH/ie4a1k40GvllyhvZpYhlr1KyxoQ
0YzdgCa6rDFKfpzyn+lV9N/XDx0e4kf1hOap8bJjtROuRpyG2LIMVczJ5RDfxhwk
/KYEUzu6kEp4cNtfgAJawQEsT45O5UxAsIi5SHm+jpyNHvXP7Q/bzFGdDiXUFA/H
gDYXyTfLtMVNmAgzX8VMjIoTQZZqsSyT42ZNVMnfywyPeyNaIo3Qgt0CQjCdTzOf
tbTO9ow2mp6eUSnlva4S6brnzLuB0gYmBowlYaReLRHB8s2fPbhUzX2hIVLV2HrD
e3cKeO7HhQaFgGGhVPNMyMdd6Z8m+P8UuXPc/TPRs5kTm/DRCnt1YqGMINk=
=H9S7
-----END PGP SIGNATURE-----
--==-=-=--

--=-=-=--





Acknowledgement sent to Zhu Zihao <all_but_last@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#44328; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 2 Nov 2020 15:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.