Q: can I mix abbrev expansions such that some expand automatically, and some only with an explicit call?
When abbrev-mode
is enabled, an abbrev expands whenever typing a self-inserting whitespace or punctuation character. However, expand-abbrev
will expand the abbrev at point even when abbrev-mode
is disabled.
Is it possible to enable abbrev-mode
and have some expansions happen automatically (ie, after whitespace and punctuation), but others expand only when I explicitly call expand-abbrev
?
Rationale:
- I'd like to use abbrevs automatically to correct common mistyped words (eg,
teh
=>the
)... - ... but would like to have explicit control of others that I use for shorthand (eg, sometimes I want to leave
dem
asdem
, and other times I'd like it to expand todemocracy
).
- (I know I could type
dem C-q <space>
, but it's awkward to do so and I usually want to use the shorthand rather than the expansion.)
- (I know I could type
To forestall well-intentioned "why not use yasnippet
?" inquiries:
- I'm experimenting with a combination of
abbrev-mode
andyasnippet
, and would prefer to use the latter for complicated expansions and the former for simple ones.