I am fairly new to Emacs.
After opening init.el
I would expect tab completion, just like in the minibuffer when doing Mx
and typing part of a command and pressing tab
to get the *Completions*
window.
However, after entering part of a line:
(add-to-
and pressing tab
, Emacs does nothing; it does not show the *Completions*
window.
Is there a method of enabling tab
completion when editing an .el
file?
You can get the TAB key to perform completion simply with
(setq tab-always-indent 'complete)
it won't prevent TAB from reindenting, tho: instead, it refines the behavior of TAB so that if TAB's reindentation has no effect (ie the line is already properly indented), it then tries to perform completion. It should work in most major modes (as long as they provide the needed completion data via completion-at-point-functions
), not just in Elisp.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.