From: seberino@spawar.navy.mil (Christian Seberino)
Subject: Re: How add "#" to blank lines when using py-comment-region???
Date: 13 Aug 2003 11:15:45 -0700 [thread overview]
Message-ID: <bf23f78f.0308131015.6ca34795@posting.google.com> (raw)
In-Reply-To: ?fnord?u1xvqaaba.fsf@ID-97657.usr.dfncis.de
Lawrence
Thanks for the help. comment-region is a powerful command useful in
all languages! I tried to set comment-empty-lines but could not
get blank lines to get commented.
Here is a small .emacs I made to try to comment empty lines when
I do a comment-region command. It works except for blank lines
in C...
(setq-default auto-mode-alist
'(("\\.c\\'" . c-mode )
("\\.h\\'" . c-mode ) ))
(add-hook 'c-mode-hook 'my-c-mode-hook )
(defun my-c-mode-hook()
(turn-on-font-lock)
(setq comment-empty-lines t) )
What am I doing wrong?
Thanks!
Chris
lawrence mitchell <wence@gmx.li> wrote in message news:<?fnord?u1xvqaaba.fsf@ID-97657.usr.dfncis.de>...
> Christian Seberino wrote:
>
> > py-comment-region lets me
> > add "#" at beginning of non-blank lines that I have
> > highlighted with mouse.
>
> > It does not add "#" for the blank lines.
>
> > How can I modify behavior of py-comment-region to do this?
>
> py-comment-region is just a minor wrapper around comment-region,
> so the variable you want to look at is comment-empty-lines.
>
> If you only want to comment blank lines in python mode, you'll
> have to make comment-empty-lines buffer local and set it in a
> hook.
prev parent reply other threads:[~2003-08-13 18:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-12 19:24 How add "#" to blank lines when using py-comment-region??? Christian Seberino
2003-08-12 20:30 ` lawrence mitchell
2003-08-13 18:15 ` Christian Seberino [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bf23f78f.0308131015.6ca34795@posting.google.com \
--to=seberino@spawar.navy.mil \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.