How do I make Emacs auto-indent my C code?

后端 未结 7 1089
一向
一向 2021-01-31 18:53

I\'m just starting to get a feel for emacs, but I am frustrated with it\'s tendency to not indent when I press the return key. I know if I press C-j it will do it, but I can\'t

7条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-31 19:21

    Try [enter], (kbd "enter") or (read-kbd-macro "enter"), they all do subtly different things ;)

    Also, for me copy/pasting just works. Can you try running emacs -q, and see if it works? If it does, it may be a problem with your .emacs.

    I also have:

    (when window-system
      ;; use extended compound-text coding for X clipboard
      (set-selection-coding-system 'compound-text-with-extensions))
    

    but that might do something else ;)

提交回复
热议问题