smarttabs icon indicating copy to clipboard operation
smarttabs copied to clipboard

breaks access-label indents in C++ code

Open pauldavisthefirst opened this issue 8 years ago • 2 comments

using c-echo-syntactic-information-p to check emacs' computed indentation shows this for C++ code in combination with smart-tabs:

class Foo { public: int bar;

the topmost-intro and class-open lines (1 and 2) show an indent of 0. the "int bar;" line shows the current buffer-local value of fill-column the "public:" line shows the default value of fill-column - 2

i have a c-offset-alist containing (access-label . /), and a c-basic-offset of 8

if i do not use smart-tabs, then the same analysis shows:

the topmost-intro and class-open lines show an indent of 0 the "int bar;" line shows an indent of 8 the "public:" line shows an indent of 4

pauldavisthefirst avatar Jun 09 '16 13:06 pauldavisthefirst

@pauldavisthefirst, I just ran into the same issue. Have you found a workaround for this?

I have commented the two lines setting the tabwidth and offset to offset to fill-column. It seems to work but I do not fully understand the implications this may have on other parts of the indentation process. @jcsalomon, could that be a workaround or fix, or what other parts will break from this?

timn avatar May 28 '18 09:05 timn

I have not. I didn't spend much time looking into it, partly because I'm, busy and partly because strangely it doesn't happen all the time.

On Mon, May 28, 2018 at 5:10 AM, Tim Niemueller [email protected] wrote:

@pauldavisthefirst https://github.com/pauldavisthefirst, I just ran into the same issue. Have you found a workaround for this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jcsalomon/smarttabs/issues/39#issuecomment-392468953, or mute the thread https://github.com/notifications/unsubscribe-auth/ADrXg2JmF3-dsnc1mpaVaoKYrA8fD0v9ks5t278jgaJpZM4Ix_wg .

pauldavisthefirst avatar May 28 '18 11:05 pauldavisthefirst