From: Keith David Bershatsky <esq@lawlist.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: xdisp.c: Suggestion to delete a few unused lines of code ...
Date: Tue, 28 Apr 2020 12:34:31 -0700 [thread overview]
Message-ID: <m2h7x32ym0.wl%esq@lawlist.com> (raw)
Thank you Eli for taking the time to review and respond to this particular thread.
You are absolutely correct!
I should have studied the code more ....
As always, your help is greatly appreciated!
Keith
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> Date: [04-28-2020 12:15:24] <28 Apr 2020 22:15:24 +0300>
> From: Eli Zaretskii <eliz@gnu.org>
> To: Keith David Bershatsky <esq@lawlist.com>
> Cc: emacs-devel@gnu.org
> Subject: Re: xdisp.c: Suggestion to delete a few unused lines of code ...
>
> > Date: Tue, 28 Apr 2020 11:46:26 -0700
> > From: Keith David Bershatsky <esq@lawlist.com>
> >
> > 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.
>
> I don't understand why you think the test will always be negative in
> the second case. The code is really
>
> bool line_number_needed = should_produce_line_number (it);
>
> if (it->current_x < it->first_visible_x + x_incr)
> {
> [...]
> if (line_number_needed)
> maybe_produce_line_number (it);
> }
> else if (it->area == TEXT_AREA)
> {
> if (line_number_needed)
> maybe_produce_line_number (it);
> [...]
> }
>
> What this says that we may need to produce the line numbers both when
> we start outside of the visible portion of the window (the 'if'
> clause) and when we start inside the visible portion.
next reply other threads:[~2020-04-28 19:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 19:34 Keith David Bershatsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-04-28 18:57 xdisp.c: Suggestion to delete a few unused lines of code Keith David Bershatsky
2020-04-28 18:46 Keith David Bershatsky
2020-04-28 19:15 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2h7x32ym0.wl%esq@lawlist.com \
--to=esq@lawlist.com \
--cc=eliz@gnu.org \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.