From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Ian Zimmerman Newsgroups: gmane.emacs.help Subject: Re: comment-kill and the state of the world Date: 24 Oct 2003 10:17:17 -0700 Organization: http://extra.newsguy.com Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87ekx2v9lu.fsf@newsguy.com> References: <878ynldq65.fsf@newsguy.com> <87r81byg53.fsf@newsguy.com> <87brsejvdc.fsf@newsguy.com> <87vfqfd35x.fsf@newsguy.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1067017744 31249 80.91.224.253 (24 Oct 2003 17:49:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 24 Oct 2003 17:49:04 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 24 19:48:57 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AD63V-0005cy-01 for ; Fri, 24 Oct 2003 19:48:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AD61C-0007tI-D3 for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Oct 2003 13:46:34 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!logbridge.uoregon.edu!pln-w!spln!dex!extra.newsguy.com!newsp.newsguy.com!enews3 Original-Newsgroups: gnu.emacs.help Original-Lines: 50 Original-NNTP-Posting-Host: p-042.newsdawg.com User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-Xref: shelby.stanford.edu gnu.emacs.help:117590 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:13523 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13523 Stefan> Could you explain why you'd want the code to be moved into Stefan> comment-indent? The next part of the thread/post. Ian> Second, do you have any advice for me when I _want_ them to behave Ian> the same? Stefan> Which difference are you referring to ? Since I have trouble Stefan> understanding your problems, please try to be very precise and Stefan> concrete. Ian> Let's say the language's comment delimiters look like this: {- -} . Ian> I can configure comment-dwim to leave appropriate amount of Ian> whitespace and put the point in the right place, so the situation Ian> after an empty comment is inserted looks like this: {- | -} . But Ian> that won't affect non-empty lines, because that is handled by Ian> comment-indent. And vice versa. Stefan> By "configure comment-dwim", I assume you mean "configure Stefan> comment-padding". Stefan> Note that if you "configure comment-dwim" by changing Stefan> comment-end and comment-start instead (by setting them to "{- " Stefan> and " -}" for example), it will work the same way for Stefan> comment-indent. I'd tried that. comment-indent then leaves point in the wrong place (right before the second hyphen). Stefan> Sometimes you want it to behave the same in both case, sometimes Stefan> you want it to behave differently, which is why there are two Stefan> ways to configure the spacing. Admittedly, the Stefan> `comment-padding' way is easier and very different from the Stefan> other, so it's pretty ugly, but that's the way it worked in Stefan> Emacs-20, so I had to support it in Emacs-21. RMS would Stefan> probably accept a patch for a new config option something like Stefan> `comment-padding-foo' which would be used for comments on Stefan> non-empty lines and could be set to nil to mean use the same Stefan> value as `comment-padding'. You'd have to come up with a good Stefan> name for the variable, tho. It's just that the need hasn't come Stefan> up yet because configuring comment-start and comment-end works Stefan> as well in all the actual cases I've come across. I think it's just sound engineering. Even if the two branches can be made to behave the same now, the more they change the harder it will be to achieve that. I'll see what I can do regarding the name :-)