bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41061: [PATCH] cc-mode: add ‘c-lineup-ternary-bodies’


From: Richard Stallman
Subject: bug#41061: [PATCH] cc-mode: add ‘c-lineup-ternary-bodies’
Date: Sun, 03 May 2020 23:15:59 -0400

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

      > return arg % 2 == 0 ? arg / 2
      >                     : (3 * arg + 1);

You can format the code that way if you like,
but the GNU convention is like this:

      return (arg % 2 == 0
              ? arg / 2
              : 3 * arg + 1);

That not only makes the nesting very clear,
it also indents correctly without a special hack.


-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)







reply via email to

[Prev in Thread] Current Thread [Next in Thread]