From: Keith David Bershatsky <esq@lawlist.com>
To: Emacs Devel <emacs-devel@gnu.org>
Subject: xdisp.c: Suggestion to delete a few unused lines of code ...
Date: Tue, 28 Apr 2020 11:46:26 -0700 [thread overview]
Message-ID: <m2k11z30u5.wl%esq@lawlist.com> (raw)
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)
{
/* ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; */
/* SUGGESTED DELETION */
/* 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);
}
else
{
/* 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;
}
next reply other threads:[~2020-04-28 18:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 18:46 Keith David Bershatsky [this message]
2020-04-28 19:15 ` xdisp.c: Suggestion to delete a few unused lines of code Eli Zaretskii
-- strict thread matches above, loose matches on Subject: below --
2020-04-28 18:57 Keith David Bershatsky
2020-04-28 19:34 Keith David Bershatsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2k11z30u5.wl%esq@lawlist.com \
--to=esq@lawlist.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).