unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Auto-indenting code
@ 2006-10-06 21:32 Gruumail
  2006-10-06 22:17 ` David Hansen
  0 siblings, 1 reply; 2+ messages in thread
From: Gruumail @ 2006-10-06 21:32 UTC (permalink / raw)


I'm looking for a way to set up my .emacs so that emacs auto-indents my
scheme code. I can get it to go into scheme-mode when I load a .scm
file, but it doesn't auto-indent whenever I go to a newline. How would
I go about doing this? And also, where would I find a good,
user-friendly guide to elisp that would explain these things?

Thanks,
Ramesh

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Auto-indenting code
  2006-10-06 21:32 Auto-indenting code Gruumail
@ 2006-10-06 22:17 ` David Hansen
  0 siblings, 0 replies; 2+ messages in thread
From: David Hansen @ 2006-10-06 22:17 UTC (permalink / raw)


On 6 Oct 2006 14:32:08 -0700 Gruumail@gmail.com wrote:

> I'm looking for a way to set up my .emacs so that emacs auto-indents my
> scheme code. I can get it to go into scheme-mode when I load a .scm
> file, but it doesn't auto-indent whenever I go to a newline. How would
> I go about doing this?

(add-hook 'scheme-mode-hook
          #'(lambda ()
              (local-set-key "\C-m" 'reindent-then-newline-and-indent)))

Also try pardit.el (search the wiki).

> And also, where would I find a good, user-friendly guide to
> elisp that would explain these things?

(info "(eintr)Top")

and

(info "(elisp)Top")

Hit C-x C-e after the closing paren.  The emacswiki is a great
resource for sample lisp code as well.

David

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-10-06 22:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-06 21:32 Auto-indenting code Gruumail
2006-10-06 22:17 ` David Hansen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).