jcsalomon / smarttabs

Emacs smart tabs - indent with tabs, align with spaces!
http://www.emacswiki.org/emacs/SmartTabs
114 stars 20 forks source link

breaks access-label indents in C++ code #39

Open pauldavisthefirst opened 8 years ago

pauldavisthefirst commented 8 years ago

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

timn commented 6 years ago

@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?

pauldavisthefirst commented 6 years ago

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 notifications@github.com 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 .