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

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

Insert appropriate line-end character (like ';' for C*)


From: Josh
Subject: Insert appropriate line-end character (like ';' for C*)
Date: Tue, 10 Jun 2008 15:11:07 -0700 (PDT)
User-agent: G2/1.0

I think I've seen this behavior in Emacs somewhere, but I can't
remember where and I'm either using the wrong terms when searching or
I'm looking in the wrong places because I can't find anything about
it. What I'm looking for is a emacs command that inserts the
appropriate end-of-line character based on mode. For example, if
you're in c-mode or java-mode or whatever it would insert a ';'.

Ideally it would be context aware so that if you were in python-mode
it would add a ':' where appropriate, but not elsewhere (and even a
',' if you're making a list), but that's not essential.

Does this already exist? If not, does anyone have any pointers on how
I could go about writing it? The only part I can't figure out is how
to determine what the right character is.


reply via email to

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