unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#25480: 26.0.50; cc-mode: punctuation in comments can affect non-comment indentation
@ 2017-01-18 22:09 Dima Kogan
  2017-11-29  2:24 ` Noam Postavsky
  0 siblings, 1 reply; 4+ messages in thread
From: Dima Kogan @ 2017-01-18 22:09 UTC (permalink / raw)
  To: 25480

[-- Attachment #1: Type: text/plain, Size: 505 bytes --]

Hi. Found another possibly-obscure issue. I'm running a very recent
build of emacs: af3db69ee64

I have the attached minimized C source. If I

- load this source with emacs -Q
- move the point to 'struct'
- hit TAB

I would expect that line to be indented "correctly", with "correctly"
meaning starting at column 0 in this case. Instead, I see it indented to
column 2. This appears to be affected by the text in the preceding
comment. If I change "aaa)" to "aaa" then I get the desired behavior.

Thanks


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: tst.h --]
[-- Type: text/x-chdr, Size: 55 bytes --]

/*
aaa). bbb ccc <=
(dd >= f)
*/

struct S { int x; };

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#25480: 26.0.50; cc-mode: punctuation in comments can affect non-comment indentation
  2017-01-18 22:09 bug#25480: 26.0.50; cc-mode: punctuation in comments can affect non-comment indentation Dima Kogan
@ 2017-11-29  2:24 ` Noam Postavsky
  2018-02-10  9:04   ` Dmitry Gutov
  0 siblings, 1 reply; 4+ messages in thread
From: Noam Postavsky @ 2017-11-29  2:24 UTC (permalink / raw)
  To: Dima Kogan; +Cc: 25480

retitle 25480 cc-mode: open-paren-in-column-0 of comment affects non-comment indentation
quit

Dima Kogan <dima@secretsauce.net> writes:

> /*
> aaa). bbb ccc <=
> (dd >= f)
> */
>
> struct S { int x; };

Doing (setq open-paren-in-column-0-is-defun-start nil) fixes it.

Alternatively, keeping the open paren out of column 0:

/*
aaa). bbb ccc <=
 (dd >= f)
*/

struct S { int x; };






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#25480: 26.0.50; cc-mode: punctuation in comments can affect non-comment indentation
  2017-11-29  2:24 ` Noam Postavsky
@ 2018-02-10  9:04   ` Dmitry Gutov
  2018-05-24  3:24     ` Noam Postavsky
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Gutov @ 2018-02-10  9:04 UTC (permalink / raw)
  To: Noam Postavsky, Dima Kogan; +Cc: 25480

On 11/29/17 5:24 AM, Noam Postavsky wrote:

> Doing (setq open-paren-in-column-0-is-defun-start nil) fixes it.
> 
> Alternatively, keeping the open paren out of column 0:
> 
> /*
> aaa). bbb ccc <=
>   (dd >= f)
> */
> 
> struct S { int x; };

Seems fixed on master (likely to be released as Emacs 27 someday)





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#25480: 26.0.50; cc-mode: punctuation in comments can affect non-comment indentation
  2018-02-10  9:04   ` Dmitry Gutov
@ 2018-05-24  3:24     ` Noam Postavsky
  0 siblings, 0 replies; 4+ messages in thread
From: Noam Postavsky @ 2018-05-24  3:24 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 25480, Dima Kogan, Noam Postavsky

close 25480
quit

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 11/29/17 5:24 AM, Noam Postavsky wrote:
>
>> Doing (setq open-paren-in-column-0-is-defun-start nil) fixes it.
>>
>> Alternatively, keeping the open paren out of column 0:
>>
>> /*
>> aaa). bbb ccc <=
>>   (dd >= f)
>> */
>>
>> struct S { int x; };
>
> Seems fixed on master (likely to be released as Emacs 27 someday)

Actually, I can't reproduce it on emacs-26 now either.  Anyway, I don't
see any need to keep this open.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-24  3:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-18 22:09 bug#25480: 26.0.50; cc-mode: punctuation in comments can affect non-comment indentation Dima Kogan
2017-11-29  2:24 ` Noam Postavsky
2018-02-10  9:04   ` Dmitry Gutov
2018-05-24  3:24     ` Noam Postavsky

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).