all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* comment-dwim and indentation
@ 2007-09-14 22:06 Dan Nicolaescu
  2007-09-14 22:26 ` Leo
  2007-09-15  1:23 ` Stefan Monnier
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Nicolaescu @ 2007-09-14 22:06 UTC (permalink / raw)
  To: emacs-devel


comment-dwim is great, it has one wrinkle though: it places the
comments in column 0. So if one comments out a region in a C function
and then reindents the function, all the comments will be indented. 

Wouldn't it be better if comment-dwim would try to put comments at the
right indentation level so that reindenting would become an nop? 
(I don't know how feasible this would be, but asking doesn't hurt :-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: comment-dwim and indentation
  2007-09-14 22:06 comment-dwim and indentation Dan Nicolaescu
@ 2007-09-14 22:26 ` Leo
  2007-09-15  1:23 ` Stefan Monnier
  1 sibling, 0 replies; 4+ messages in thread
From: Leo @ 2007-09-14 22:26 UTC (permalink / raw)
  To: emacs-devel

On 2007-09-14 23:06 +0100, Dan Nicolaescu wrote:
> comment-dwim is great, it has one wrinkle though: it places the
> comments in column 0. So if one comments out a region in a C function
> and then reindents the function, all the comments will be indented. 
>
> Wouldn't it be better if comment-dwim would try to put comments at the
> right indentation level so that reindenting would become an nop? 
> (I don't know how feasible this would be, but asking doesn't hurt :-)

I agree. It would be much better this way.

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

=>             "(require 'cl) considered harmful" considered harmful
=>           http://dto.freeshell.org/blog/blog-2007-09-07-2323.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: comment-dwim and indentation
  2007-09-14 22:06 comment-dwim and indentation Dan Nicolaescu
  2007-09-14 22:26 ` Leo
@ 2007-09-15  1:23 ` Stefan Monnier
  2007-09-15  7:33   ` Leo
  1 sibling, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2007-09-15  1:23 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

> comment-dwim is great, it has one wrinkle though: it places the
> comments in column 0.

C-h v comment-style RET


        Stefan


PS: This issue of "comments in column 0" was one of the original motivation
for writing newcomment.el.  You'll notice that every style other than the
default one addresses your request.  The default style was added late in
response to Richard who insisted that "comments in column 0" should be the
default style, which partly defeated my efforts since very few people know
of comment-style.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: comment-dwim and indentation
  2007-09-15  1:23 ` Stefan Monnier
@ 2007-09-15  7:33   ` Leo
  0 siblings, 0 replies; 4+ messages in thread
From: Leo @ 2007-09-15  7:33 UTC (permalink / raw)
  To: emacs-devel

On 2007-09-15 02:23 +0100, Stefan Monnier wrote:
>> comment-dwim is great, it has one wrinkle though: it places the
>> comments in column 0.
>
> C-h v comment-style RET
>
>
>         Stefan
>
>
> PS: This issue of "comments in column 0" was one of the original motivation
> for writing newcomment.el.  You'll notice that every style other than the
> default one addresses your request.  The default style was added late in
> response to Richard who insisted that "comments in column 0" should be the
> default style, which partly defeated my efforts since very few people know
> of comment-style.

I think the default style should be 'indent.

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

=>             "(require 'cl) considered harmful" considered harmful
=>           http://dto.freeshell.org/blog/blog-2007-09-07-2323.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-09-15  7:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-14 22:06 comment-dwim and indentation Dan Nicolaescu
2007-09-14 22:26 ` Leo
2007-09-15  1:23 ` Stefan Monnier
2007-09-15  7:33   ` Leo

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.