emacs-devel
[Top][All Lists]
Advanced

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

Re: What's the line length limit in the Emacs codebase?


From: Yuri Khan
Subject: Re: What's the line length limit in the Emacs codebase?
Date: Sat, 26 Dec 2020 18:17:52 +0700

On Sat, 26 Dec 2020 at 17:39, Michael Albinus <michael.albinus@gmx.de> wrote:

> > But sometimes (e.g. you have long string literals where
> > breaks don't make sense -- but there are other examples),
> > it is rather counterproductive to stick religiously to
> > that rule.
>
> In Lisp code, I break such long strings into substrings, wrapped by concat.
> Just for the better readability with 80 columns.

I’m used to doing the same, but some coding style guides present a
good reason to avoid doing that[1]:

    6.2: Strings that cause the line to go over 100 characters
    should not be written across multiple lines using string concatenation.

    > Why? Broken strings are painful to work with
    > and make code less searchable.

[1]: https://github.com/airbnb/javascript#strings--line-length

I have actually found myself trying to grep for an error message ang
failing to find it in code at first try because it was line-broken at
a non-obvious point.



reply via email to

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