Xref: utzoo gnu.emacs.help:606 gnu.g++.help:272 comp.emacs:9750 Path: utzoo!attcan!utgpu!watserv1!watmath!uunet!cs.utexas.edu!samsung!sdd.hp.com!elroy.jpl.nasa.gov!ames!sgi!dragon!dragon!jackr From: jackr@dblues.wpd.sgi.com (John (Jack) Repenning) Newsgroups: gnu.emacs.help,gnu.g++.help,comp.emacs Subject: Re: C++ mode and << (change request) Message-ID: Date: 17 Dec 90 10:07:16 GMT References: <1990Dec11.174324.11176@julius.cs.uiuc.edu> Sender: news@relay.wpd.sgi.com ( CNews Account ) Organization: Silicon Graphics, Inc. Lines: 49 In-Reply-To: sane@cs.uiuc.edu's message of 11 Dec 90 17:43:24 GMT In article <1990Dec11.174324.11176@julius.cs.uiuc.edu> sane@cs.uiuc.edu (Aamod Sane) wants: Not this: cout << djfhsjdf << sdjfhsdhfjdf << sjhfjshf << sdjfhjkdfh << jsdhfjkhf dfhjksdhf << jdfhjhdfjhdf << \n but rather this: cout << sjfjskdf << sdjfhsdkjf << shfdjhf << jahdkjhskjdhf << dhfjhda << sdfhjsdhfjkh << jdhfkjsdhfhs << \n; I think I agree with Aamod's sense of aesthetics. In fact, I think I would go a step further. What c++-mode is doing with the "<<" lines here is consistent with what it does with other continuation lines, and I think I'd like Aamod's treatment applied there, too. For example: sum = a[0] + a[1] + a[2] + a[3] + a[4] + a[5] + a[6] + a[7] + a[8] + a[9] + a[10] + a[11] + a[12] + a[13] + a[14] + a[15] + a[16] + a[17] + a[18] + a[19] + a[20] + a[21] + a[22] + a[23] + a[24] + a[25]; Wouldn't this look better like this? sum = a[0] + a[1] + a[2] + a[3] + a[4] + a[5] + a[6] + a[7] + a[8] + a[9] + a[10] + a[11] + a[12] + a[13] + a[14] + a[15] + a[16] + a[17] + a[18] + a[19] + a[20] + a[21] + a[22] + a[23] + a[24] + a[25]; It appears to me that the "<<" behavior is merely a consequence of this more general behavior: what Aamod proposes specifically would be some kind of special case, while changing the general behavior would also fix Aamod's desires. I suppose this hadn't up very often, even in c-mode, until people started stringing "<<" together. What I'm wondering is, is there some semantic confusion here I should consider? Does the cascading indentation represent some meaning that ought to be preserved? Does the columnar indentation suggest something that it oughtn't? What does this group's readership think? ---------------- Jack Repenning 9U-530 jackr@wpd.sgi.com Silicon Graphics, Inc. Off:(415) 335-7477