1

I read the docs (at bottom) but can't figure this out.

I just started using "abbrev.el", and find that pressing space, tab, C-x ', C-x a ', C-x a e can cause the expansion to happen.

what if I find it dangerous for the expand to happen on tab and space, how can I tell abbrev.el to not expand when pressing tab/space,

I still want to keep the ability to expand using "C-x ', C-x a ', C-x a e"

C-x ' runs the command expand-abbrev (found in global-map), which is
an interactive compiled Lisp function in ‘abbrev.el’.

It is bound to C-x ', C-x a ', C-x a e.

(expand-abbrev)

Expand the abbrev before point, if there is an abbrev there.
Effective when explicitly called even when ‘abbrev-mode’ is nil.
Before doing anything else, runs ‘pre-abbrev-expand-hook’.
Calls the value of ‘abbrev-expand-function’ with no argument to do
the work, and returns whatever it does.  (That return value should
be the abbrev symbol if expansion occurred, else nil.)
2

When abbrev-mode is on, it expands abbreviations anytime you enter a character with non-word syntax, such as a space, a tab, or a period.

If you don't like that behavior, turn off abbrev-mode. Calling expand-abbrev explicitly will still expand your abbreviations, and you can bind that command to whatever keybinding you like.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.