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

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

Re: LISP routines for commenting


From: Joel J. Adamson
Subject: Re: LISP routines for commenting
Date: Fri, 08 Aug 2008 21:43:34 -0400

>>>>> "Alex" == Alex Gusarov <alex.m.gusarov@gmail.com> writes:

    Alex> Hello,
    Alex> I want to implement some lisp functions for the following:
    Alex> 1. Insert comment - when mark some lines of code and using it, insert
    Alex> ins-comments, like this:

    Alex> before:

    Alex> l = []
    Alex> l.append(1)

    Alex> then mark it and use ins-func, after:

    Alex> # ins > <username>, <current date and time>
    Alex> l = []
    Alex> l.append(1)
    Alex> # ins < <username>, <current date and time>

If I understand correctly, you want to implement some lisp to comment
your Python code?  Have you tried Python mode?  There is a commonly used
key (M-;) that comments lines and regions --- look up the function
"comment-region."  In each programming language mode, this function
inserts the proper comments for the language you are using (e.g., ";"
for lisp and "#" for Python, Perl, et al).

Please be specific if you want something else.

Joel

-- 
Joel J. Adamson
(303) 880-3109
Public key: http://pgp.mit.edu
http://www.unc.edu/~adamsonj
http://trashbird1240.blogspot.com




reply via email to

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