[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#44328: 27.1; [PATCH] Add expand-abbrev-maybe condition key binding
From: |
Lars Ingebrigtsen |
Subject: |
bug#44328: 27.1; [PATCH] Add expand-abbrev-maybe condition key binding |
Date: |
Sun, 01 Nov 2020 15:25:21 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
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
- bug#44328: 27.1; [PATCH] Add expand-abbrev-maybe condition key binding,
Lars Ingebrigtsen <=