From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Fill column indicator functionality Date: Fri, 03 May 2019 21:32:14 +0300 Message-ID: <83h8abmlsh.fsf@gnu.org> References: <20190407183806.htl4pujrb2kmk4kv@Ergus> <83mul18wpv.fsf@gnu.org> <20190407200514.2p6gfucdcdsrqe47@Ergus> <83ef6d8c40.fsf@gnu.org> <20190408085102.ozcuvs323ilfid7n@Ergus> <83bm1g8s02.fsf@gnu.org> <20190412134633.g47vybtpkwxyw7dq@Ergus> <834l73mir0.fsf@gnu.org> <20190501110808.27o64tawy2gyjocr@Ergus> <83sgtvn08w.fsf@gnu.org> <20190503174935.5i2gn2nsxr4aezvf@Ergus> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="262887"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 03 23:15:10 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hMfWN-0012u5-24 for ged-emacs-devel@m.gmane.org; Fri, 03 May 2019 23:15:07 +0200 Original-Received: from localhost ([127.0.0.1]:45765 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMczh-0000kB-JB for ged-emacs-devel@m.gmane.org; Fri, 03 May 2019 14:33:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMcz3-0000js-JF for emacs-devel@gnu.org; Fri, 03 May 2019 14:32:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57233) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMcz3-0001QZ-7m; Fri, 03 May 2019 14:32:33 -0400 Original-Received: from [176.228.60.248] (port=2987 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hMcz2-00019W-Fv; Fri, 03 May 2019 14:32:33 -0400 In-reply-to: <20190503174935.5i2gn2nsxr4aezvf@Ergus> (message from Ergus on Fri, 3 May 2019 19:49:35 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236113 Archived-At: > Date: Fri, 3 May 2019 19:49:35 +0200 > From: Ergus > Cc: emacs-devel@gnu.org > > >> + if (EQ (Vdisplay_fill_column_indicator_column, Qt) > >> + && FIXNATP (BVAR (current_buffer, fill_column))) > >> + fill_column_indicator_column = > >> + XFIXNAT (BVAR (current_buffer, fill_column)); > >> + else if (FIXNATP (Vdisplay_fill_column_indicator_column)) > >> + fill_column_indicator_column = > >> + XFIXNAT (Vdisplay_fill_column_indicator_column); > > > >There's no 'else' clause here. What will happen if neither of these > >two conditions holds? What do we want to happen then? > > > The variable is initialized to a right value that will no produce > indicator, so I don't actually need the else. But any way I made a small > change I like more. In general, conditions that "cannot happen" should call emacs_abort. That variable can be set by users to any value, including values you don't expect. If the code survives that, then fine; otherwise, the prudent thing is to disable the feature or abort.