simon-git: spigot (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sat Feb 18 09:17:34 GMT 2017
TL;DR:
0ad02e1 Add emacs c++-mode marker in all .h files.
20b54dc Move some functions' opening braces to placate emacs.
40fb8db Fix a few specific mis-indented lines.
Repository: https://git.tartarus.org/simon/spigot.git
On the web: https://git.tartarus.org/?p=simon/spigot.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2017-02-18 09:17:34
commit 0ad02e1e1e1341f0dd1e5a6667329d0754d82728
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=0ad02e1e1e1341f0dd1e5a6667329d0754d82728;hp=cc419ee53828a410e9b1aa9b47e5fac6f787501a
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Feb 18 09:03:22 2017 +0000
Add emacs c++-mode marker in all .h files.
I'm tired of emacs assuming that just because I didn't give them
filenames ending in .hh, it should use c-mode rather than c++-mode for
them and mishighlight/misindent various C++ish constructions.
baseout.h | 2 +-
bi_gmp.h | 2 +-
bi_internal.h | 2 +-
bigint.h | 2 +-
cfracout.h | 2 +-
cr.h | 2 +-
error.h | 2 +-
expr.h | 2 +-
funcs.h | 2 +-
holefiller.h | 2 +-
spigot.h | 2 +-
version.h | 2 +-
12 files changed, 12 insertions(+), 12 deletions(-)
commit 20b54dc9e750bba5738e2d5fe386bf8aa5530156
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=20b54dc9e750bba5738e2d5fe386bf8aa5530156;hp=0ad02e1e1e1341f0dd1e5a6667329d0754d82728
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Feb 18 09:07:22 2017 +0000
Move some functions' opening braces to placate emacs.
When a member function definition appears inside the main class Foo
{...} declaration, emacs c++-mode really wants the opening brace of
the function body to follow the function prototype without a line
break. If you do put a line break before the open brace, it indents
the open brace by an extra 4 spaces, and then does the same to the
rest of the function body.
Normally this isn't a problem, because if you manually move the open
brace to where it should be, emacs follows your lead and indents the
rest of the function relative to that, so you can edit code most of
the time without this causing a problem. But I did some bulk
reindentation in the course of the unique_ptr refactoring and found it
was annoying that emacs kept wanting to move entire functions four
spaces to the right, so here's a fix to move all those braces to where
emacs prefers them,, which should at least make _most_ of the code
invariant under emacs whole-file reindenting - good enough to apply a
misindented patch, bulk-reindent the 'before' and 'after' versions,
and diff them to get an indentation-sanitised version of the same
patch.
consts.cpp | 15 +++++----------
enforce.cpp | 12 ++++--------
erf.cpp | 12 ++++--------
exp.cpp | 27 +++++++++------------------
expint.cpp | 18 ++++++------------
expr.cpp | 15 +++++----------
gamma.cpp | 36 ++++++++++++------------------------
holefiller.h | 9 +++------
io.cpp | 18 ++++++------------
monotone.cpp | 15 +++++----------
sqrt.cpp | 12 ++++--------
trig.cpp | 27 +++++++++------------------
unary.cpp | 18 ++++++------------
zeta.cpp | 5 ++---
14 files changed, 80 insertions(+), 159 deletions(-)
commit 40fb8dbe3e529dad0d00a740e731e14dea692b19
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=40fb8dbe3e529dad0d00a740e731e14dea692b19;hp=20b54dc9e750bba5738e2d5fe386bf8aa5530156
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Feb 18 09:11:54 2017 +0000
Fix a few specific mis-indented lines.
Examining the detritus from test-reindenting the whole code base in
the course of the previous commit, a few differences jumped out at me
as actually straight-up wrong. They're not very large, so while I'm
doing indentation trivia anyway, I might as well fix them.
expr.cpp | 2 +-
funcs.h | 2 +-
main.cpp | 2 +-
monotone.cpp | 2 +-
zeta.cpp | 9 ++++-----
5 files changed, 8 insertions(+), 9 deletions(-)
More information about the tartarus-commits
mailing list