[Top][All Lists]

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

Re: C-mode electric braces

From: Klaus Berndl
Subject: Re: C-mode electric braces
Date: 11 Sep 2002 17:46:56 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

On Wed, 11 Sep 2002, Carsten Burstedde wrote:

>  Just curious: How do I make execute-kbd-macro simulate a return press?
>  I made several tries, but it did not work. And what does the # in
>  front of the '(lambda ?

(execute-kbd-macro (kbd "<RET>"))

But just for your information: If you want to add some RETURNs in the
brace-behavior you asked for you should not insert RETs hardly neither with
(insert...)  nor with (execute-kbd-macro ...) but you should customize with
the cc-mode options if and when RETs should be inserted before or after
inserting braces (this is the electric behavior!).

AFAIK #'(lambda... is the same as (function (lambda... Read the documentation
of *function*. It helps the byte-compiler but AFAIK with recent Emacs-version
21.X this is no longer necessary...but don't know exactly.


Klaus Berndl                    mailto: address@hidden
sd&m AG               
software design & management    
Thomas-Dehler-Str. 27, 81737 München, Germany
Tel +49 89 63812-392, Fax -220

reply via email to

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