[Top][All Lists]

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

xdisp.c: Suggestion to delete a few unused lines of code ...

From: Keith David Bershatsky
Subject: xdisp.c: Suggestion to delete a few unused lines of code ...
Date: Tue, 28 Apr 2020 11:46:26 -0700

In the function display_line within xdisp.c, there is the following code set 
forth below.  Inasmuch as the first main condition is whether 
(line_number_needed), the second test within the ELSE IF statement for whether 
(line_number_needed) will always be negative; i.e., it would have to be 
negative or else we would never have gotten to the ELSE IF statement ... since 
the test will always be negative, Emacs will never call 
maybe_produce_line_number within the ELSE IF section of this code.

      /* Produce line number, if needed.  */
      if (line_number_needed)
        maybe_produce_line_number (it);
  else if (it->area == TEXT_AREA)

/* ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; */

      /* Line numbers should precede the line-prefix or wrap-prefix.  */
      if (line_number_needed)
        maybe_produce_line_number (it);

/* ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; */

      /* We only do this when not calling move_it_in_display_line_to
         above, because that function calls itself handle_line_prefix.  */
      handle_line_prefix (it);
      /* Line-prefix and wrap-prefix are always displayed in the text
         area.  But if this is the first call to display_line after
         init_iterator, the iterator might have been set up to write
         into a marginal area, e.g. if the line begins with some
         display property that writes to the margins.  So we need to
         wait with the call to handle_line_prefix until whatever
         writes to the margin has done its job.  */
      pending_handle_line_prefix = true;

reply via email to

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