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

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

Re: question regarding to 2 features of Emacs


From: prad
Subject: Re: question regarding to 2 features of Emacs
Date: Thu, 12 Mar 2009 21:34:07 -0700

On Fri, 13 Mar 2009 15:02:03 +1300
Jidi Sun <jsu25@student.canterbury.ac.nz> wrote:

> On the internet I saw pictures of Emacs with different 
> colors shown for different parts of function,
>
jidi,
you can enable syntax highlight by activating 
M-x font-lock-mode
(http://linux.about.com/od/emacs_doc/a/emacsdoc171.htm)
or you can put it into your .emacs file according to that page

> also it is able to
> start with some spaces from left margin once press Enter key within a 
> function. 
>
i think what you mean is to have automatic indenting which can be done
by C-j instead of enter as long as you have a .el file for the language
you are using (though it is possible to have the enter key do this too
by putting this in your .emacs:
;; Default to auto-indent on Enter
(define-key emacs-lisp-mode-map [(control j)] 'newline)
(define-key emacs-lisp-mode-map [(control m)] 'newline-and-indent)))



-- 
In friendship,
prad

                                      ... with you on your journey
Towards Freedom
http://www.towardsfreedom.com (website)
Information, Inspiration, Imagination - truly a site for soaring I's




reply via email to

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