From: Dave A. <da...@bo...> - 2013-03-07 16:21:43
|
on Thu Mar 07 2013, Alan Mackenzie <acm-AT-muc.de> wrote: > Hi, Dave. > > On Tue, Mar 05, 2013 at 06:25:17PM -0800, Dave Abrahams wrote: > >> on Tue Mar 05 2013, Alan Mackenzie <acm-AT-muc.de> wrote: > >> >> It seems to me that either c-lineup-whitesmith-in-block really ought to >> >> include that beginning-of-line call in it, or there needs to be some way >> >> in cc-mode styles to express "what matters here is the syntactic context >> >> at BOL." > >> > The lack of (beginning-of-line) is a bug. > >> Hmm, but isn't it by far the most common case that indentation depends >> only on the syntax at the beginning of the line? It seems backward to >> make 99% of these functions start with (beginning-of-line) when you >> could instead provide a way to retrieve the previous point for those >> very few functions that need it. > > Yes, but we've got to preserve the (historical) calling conventions, I wouldn't suggest otherwise > I don't think there can be any line-up functions which depend on the > current position in the line, since TAB can be used with point > anywhere; it would be silly if the indentation depended upon point > this way. That was my thinking. In that case, why not just have cc-mode always go to the beginning of the line before asking the line-up functions to do anything? -- Dave Abrahams |