help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

indenting automatically after pasting in c-mode


From: Dirk80
Subject: indenting automatically after pasting in c-mode
Date: Wed, 12 Aug 2009 08:01:40 -0700 (PDT)

Hi,

I use emacs mainly to write c-code. 

For example I paste 10 lines of code into a function. Now this 10 lines of
code are just inserted into the buffer as they are and not indented. I have
to mark these 10 lines, and then pressing TAB (indent-for-tab-command) and
everything is fine.

It would be great if the 10 lines would be intended automatically (without
marking the 10 lines and then pressing tab) when I paste them.

How could I solve this? Do I have to write an own elisp-function which is
doing the job and then binding it in c-mode to C-y. Or is this behaviour
already implemented?

Thanks for your answers.
Dirk
-- 
View this message in context: 
http://www.nabble.com/indenting-automatically-after-pasting-in-c-mode-tp24938448p24938448.html
Sent from the Emacs - Help mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]