From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: What's the line length limit in the Emacs codebase? Date: Sat, 26 Dec 2020 13:14:20 +0200 Message-ID: <831rfcn7jn.fsf@gnu.org> References: <83wnx8pm0e.fsf@gnu.org> <83v9cpn1w5.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31508"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Philipp Stephani Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 26 12:15:36 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kt7Xs-00087G-DA for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Dec 2020 12:15:36 +0100 Original-Received: from localhost ([::1]:37362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kt7Xr-0002xh-Fl for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Dec 2020 06:15:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kt7Wt-0001rM-SY for emacs-devel@gnu.org; Sat, 26 Dec 2020 06:14:35 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60990) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kt7Wt-00023i-K3; Sat, 26 Dec 2020 06:14:35 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1427 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kt7Ws-0005kn-G2; Sat, 26 Dec 2020 06:14:35 -0500 In-Reply-To: (message from Philipp Stephani on Sat, 26 Dec 2020 12:09:17 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:261840 Archived-At: > From: Philipp Stephani > Date: Sat, 26 Dec 2020 12:09:17 +0100 > Cc: Emacs developers > > > You are counting long strings and lines with long URLs? Is that > > reasonable? > > If you look at emacs.c, you'll see lots of lines that are not long > URLs etc., but e.g. comment blocks that could easily be reflowed, and > I was wondering why that didn't happen when these comments were > introduced. History, I suppose. I usually reformat any comment line around the code I change when it's too long. It's a slow process. > Just to give some context, I became aware of this when editing various > parts of the Emacs codebase while having the fill column indicator > enabled. I then realized that large parts of the code seem to use an > 80-column limit, while others seem to use a 70-column limit, and I was > wondering why that's the case. The value of fill-column is not for judging the length of code lines, it's for comments and strings. Code lines can use 80 lines, provided that they are broken in reasonable places, and that the continuation lines are indented consistently with the code structure.