Skip to content

Commit

Permalink
Add fill-column: 100 to the Emacs mode line
Browse files Browse the repository at this point in the history
Vim users: No reason to panic. This does not mean that Emacs users
would suddenly start to split existing (or new) code lines always
before column 100. The default value for fill-column is 70, and that
hasn't forced code lines edited in Emacs to be shorter than that
earlier either.

The primary intent of using a fill-column of 100 (instead of the
default 70) is that when you edit some long (multi-line) comment
block, and you want to reformat ("fill", "reflow") that comment (using
the fill-paragraph command, bound to Meta-Q), lines will be filled up
to column 100, and not just 70, which in most cases would look quite
short.

Unless I am strongly advised not to, I will start adding this to the
mode lines in source files if I remember, as I happen to edit some
comment block in them.

Change-Id: Icfb93dbb22b2db7190fdc9c8ee9518d08e73c7a8
  • Loading branch information
Tor Lillqvist committed Nov 8, 2016
1 parent b58e3de commit f75cd22
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions TEMPLATE.SOURCECODE.HEADER
Expand Up @@ -30,7 +30,7 @@ existing module, then:

For C/C++/Java/IDL etc.

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This file is part of the LibreOffice project.
*
Expand All @@ -43,7 +43,7 @@ For C/C++/Java/IDL etc.

For makefiles:

# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
#
# This file is part of the LibreOffice project.
#
Expand Down Expand Up @@ -89,7 +89,7 @@ For XML / .component:

For C/C++/Java/IDL etc.

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This file is part of the LibreOffice project.
*
Expand All @@ -112,7 +112,7 @@ For C/C++/Java/IDL etc.

For makefiles, perl, scripts etc.

# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
#
# This file is part of the LibreOffice project.
#
Expand Down

0 comments on commit f75cd22

Please sign in to comment.