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

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

Re: modes not doing much


From: Giorgos Keramidas
Subject: Re: modes not doing much
Date: Sun, 13 Aug 2006 01:17:09 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix)

On 12 Aug 2006 14:23:28 -0700, dsjoblom@abo.fi wrote:
> YAD wrote:
>> So far I've used Ruby mode and HTML mode.
>> No colors, no auto-indent on <rtrn>.
>
> Others have already helped with the coloring problem, but you may want
> to try this in your .emacs to set up auto-indenting for programming
> modes you are using:
>
> (add-hook 'perl-mode-hook
>           #'(lambda ()
>               ;; A better newline
>               (local-set-key "\C-m"
> #'reindent-then-newline-and-indent)))

In recent Emacs versions, you can also write this as:

    (add-hook 'perl-mode-hook
              (lambda ()
                ;; A better newline
                (local-set-key (kbd "RET") 'reindent-then-newline-and-indent)))

which I sometimes find cleaner than "\C-\M-\S-foo" stuff :)



reply via email to

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