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

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

Re: Autoinsert


From: Chmouel Boudjnah
Subject: Re: Autoinsert
Date: Mon, 30 Dec 2002 13:50:13 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-msvc-nt5.0.2195)

Roberto Huelga <rhuelga@multinterior.com> writes:

>       I'm starting with the skeletons and autoinsert. Skeletons and
> abbrevs work fine, but the autoinsert doesn't expand the tag.
>       In my .emacs file I have the following lines about autoinsert:

[...]

> (define-auto-insert "\\.\\(H\\|hh\\|hxx\\|hpp\\)\\'" "cxx-header.hh")

maybe this may work :

(add-to-list 'auto-insert-alist `("\\.\\(H\\|hh\\|hxx\\|hpp\\)\\'" . 
"cxx-header.hh"))

and be sure that you have the file cxx-header.hh in the directory
defined by the variable auto-insert-directory.

[...]

>       And nothing is expanded. Someone can help me? (I don't want to use
> skeletons here)

Cheers Chmouel.

-- 
http://www.chmouel.com/
>From dziulko@klaatu.canisius.edu Mon Dec 30 08:57:40 2002
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
        id 18T0QF-0003gZ-00
        for help-gnu-emacs@gnu.org; Mon, 30 Dec 2002 08:57:39 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
        id 18T0QB-0003c3-00
        for help-gnu-emacs@gnu.org; Mon, 30 Dec 2002 08:57:39 -0500
Received: from [138.92.8.100] (helo=klaatu.canisius.edu)
        by monty-python.gnu.org with esmtp (Exim 4.10.13)
        id 18T0QA-0003Wh-00
        for help-gnu-emacs@gnu.org; Mon, 30 Dec 2002 08:57:34 -0500
Received: from localhost (dziulko@localhost)
        by klaatu.canisius.edu (8.11.6/8.11.6) with ESMTP id gBUDvUP29529
        for <help-gnu-emacs@gnu.org>; Mon, 30 Dec 2002 08:57:31 -0500
Date: Mon, 30 Dec 2002 08:57:30 -0500 (EST)
From: Kevin Dziulko <dziulko@klaatu.canisius.edu>
To: help-gnu-emacs@gnu.org
In-Reply-To: <qlcy96m58g4.fsf@nymfe33.fi.muni.cz>
Message-ID: <Pine.LNX.4.44.0212300852430.29500-100000@klaatu.canisius.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: Re: C Mode Comments
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 30 Dec 2002 13:57:40 -0000

I am running GNU Emacs 20.2.3.  M-; does not run comment-dwim, but runs 
indent-for-comment.

What I am looking for is a command that would have the effect of killing 
an entire comment.  For example, given:

int x;      /* this is a comment */

Only "int x;" would remain on this line of code.

Thanks.

On 19 Dec 2002, Jiri Pejchal wrote:

> Kevin Dziulko <dziulko@klaatu.canisius.edu> writes:
> 
> > Does anyone know if there is a command to mark a comment, or kill a
> > comment in c-mode?
> > 
> > Thanks much.
> 
> Try M-; which runs the command comment-dwim.
> 
> Mark a region (with M-h or whatever) then M-;
> to comment region.
> 
> Do the same one more time to uncomment the region.
>   
> Call the comment command you want (Do What I Mean).
> If the region is active and `transient-mark-mode' is on, call
>   `comment-region' (unless it only consists of comments, in which
>   case it calls `uncomment-region').
> Else, if the current line is empty, insert a comment and indent it.
> Else if a prefix ARG is specified, call `comment-kill'.
> Else, call `comment-indent'.
> 
> Jiri Pejchal
> 




reply via email to

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