emacs-devel
[Top][All Lists]
Advanced

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

Re: Fill column indicator functionality


From: Eli Zaretskii
Subject: Re: Fill column indicator functionality
Date: Fri, 03 May 2019 21:32:14 +0300

> Date: Fri, 3 May 2019 19:49:35 +0200
> From: Ergus <address@hidden>
> Cc: address@hidden
> 
> >> +         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.



reply via email to

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