I'm a bit of an elisp newbie. How can I tell emacs to toggle electric-indent-mode when I press "Cc e" ?
I tried
(global-set-key (kbd "C-c e") 'toggle-electric-indent-mode)
but that does't seem to do it for me.
The mode is just a function that you can call. Try:
(global-set-key (kbd "C-c e") 'electric-indent-mode)
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.