unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#33197: 26.1; cc-mode enum indentation
@ 2018-10-29 21:03 Ota, Takaaki
  2020-11-26 13:00 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Ota, Takaaki @ 2018-10-29 21:03 UTC (permalink / raw)
  To: 33197

The enum indentation in cc-mode used to look like this.

	  enum {
	    pDlen = sizeof pD - 1,
	    pIlen = sizeof pI - 1,
	    pMlen = sizeof pMd - 2
	  };
	  enum {
	    no_modifier, long_modifier, pD_modifier, pI_modifier, pM_modifier
	  } length_modifier = no_modifier;

This is a portion of doprnt.c in the current 26.1 source code.  But
now the 26.1 cc-mode indents like this

	  enum {
                pDlen = sizeof pD - 1,
                pIlen = sizeof pI - 1,
                pMlen = sizeof pMd - 2
	  };
	  enum {
                no_modifier, long_modifier, pD_modifier, pI_modifier, pM_modifier
	  } length_modifier = no_modifier;

If the enum has a long name before the open brace it looks even worse
by wasting a lot of unnecessary spaces.

	  enum some_long_enum_type_name {
                                         pDlen = sizeof pD - 1,
                                         pIlen = sizeof pI - 1,
                                         pMlen = sizeof pMd - 2
	  };
	  enum another_long_enum_type_name {
                                            no_modifier, long_modifier, pD_modifier, pI_modifier, pM_modifier
	  } length_modifier = no_modifier;

Please consider bringing it back to how it used to be.

-Tak





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

* bug#33197: 26.1; cc-mode enum indentation
  2018-10-29 21:03 bug#33197: 26.1; cc-mode enum indentation Ota, Takaaki
@ 2020-11-26 13:00 ` Lars Ingebrigtsen
  2020-11-26 13:14   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-26 13:00 UTC (permalink / raw)
  To: Ota, Takaaki; +Cc: 33197

"Ota, Takaaki" <Takaaki.Ota@sony.com> writes:

> The enum indentation in cc-mode used to look like this.
>
> 	  enum {
> 	    pDlen = sizeof pD - 1,
> 	    pIlen = sizeof pI - 1,
> 	    pMlen = sizeof pMd - 2
> 	  };
> 	  enum {
> 	    no_modifier, long_modifier, pD_modifier, pI_modifier, pM_modifier
> 	  } length_modifier = no_modifier;
>
> This is a portion of doprnt.c in the current 26.1 source code.  But
> now the 26.1 cc-mode indents like this
>
> 	  enum {
>                 pDlen = sizeof pD - 1,
>                 pIlen = sizeof pI - 1,
>                 pMlen = sizeof pMd - 2
> 	  };

I tested this in Emacs 27.1 and Emacs 28, and they both indent this code
like in the first example.

Are you still seeing this issue in Emacs 27?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#33197: 26.1; cc-mode enum indentation
  2020-11-26 13:00 ` Lars Ingebrigtsen
@ 2020-11-26 13:14   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-26 13:14 UTC (permalink / raw)
  To: Ota, Takaaki; +Cc: 33197

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I tested this in Emacs 27.1 and Emacs 28, and they both indent this code
> like in the first example.

I build Emacs 26.1 and tested there, and I could indeed see the bug you
describe.

So it looks like it's been fixed in Emacs 27, and I'm closing this bug
report.  If it's still an issue, please respond to the debbugs address
and we'll reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2020-11-26 13:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-29 21:03 bug#33197: 26.1; cc-mode enum indentation Ota, Takaaki
2020-11-26 13:00 ` Lars Ingebrigtsen
2020-11-26 13:14   ` Lars Ingebrigtsen

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).