From: Lars Ingebrigtsen <larsi@gnus.org>
To: Zhu Zihao <all_but_last@163.com>
Cc: 44328@debbugs.gnu.org
Subject: bug#44328: 27.1; [PATCH] Add expand-abbrev-maybe condition key binding
Date: Sun, 01 Nov 2020 15:25:21 +0100 [thread overview]
Message-ID: <87v9ep9msu.fsf@gnus.org> (raw)
In-Reply-To: <86h7qbdbsv.fsf@163.com> (Zhu Zihao's message of "Fri, 30 Oct 2020 22:32:32 +0800")
Zhu Zihao <all_but_last@163.com> 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
next prev parent reply other threads:[~2020-11-01 14:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-30 14:32 bug#44328: 27.1; [PATCH] Add expand-abbrev-maybe condition key binding Zhu Zihao
2020-11-01 14:25 ` Lars Ingebrigtsen [this message]
2020-11-02 5:41 ` bug#44328: " Zhu Zihao
2020-11-02 15:30 ` Lars Ingebrigtsen
2020-11-03 4:40 ` Zhu Zihao
2021-05-13 11:25 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v9ep9msu.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=44328@debbugs.gnu.org \
--cc=all_but_last@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).