From: Robert Pluim <rpluim@gmail.com>
To: Jesse Medeiros <jessenzr@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, Stefan Kangas <stefan@marxist.se>,
emacs-devel@gnu.org
Subject: Re: Patch to vertically center line content when using line-spacing variable
Date: Mon, 30 Sep 2019 09:07:28 +0200 [thread overview]
Message-ID: <m2k19qp8i7.fsf@gmail.com> (raw)
In-Reply-To: <CABDXFDnf6o3tvkDcsAWt+NMViizBf11Vp8NUtouBTxTPqeXxig@mail.gmail.com> (Jesse Medeiros's message of "Sun, 29 Sep 2019 20:54:01 -0300")
>>>>> On Sun, 29 Sep 2019 20:54:01 -0300, Jesse Medeiros <jessenzr@gmail.com> said:
Jesse> I've worked the on these issues you raised. Hopefully it's all ok now.
Nit-picking below, plus one question about the code.
Jesse> From 9bc5cbb727e5dcac9f774028858e2608d1a23033 Mon Sep 17 00:00:00 2001
Jesse> From: Jesse Nazario <jessenzr@gmail.com>
Jesse> Date: Sun, 8 Sep 2019 20:06:15 -0300
Jesse> Subject: [PATCH] Center lines vertically with line-spacing-vertical-center
Jesse> When using line-spacing, the new variable line-spacing-vertical-center
Jesse> can be set to non-nil to center the line content
Jesse> vertically.
We use ChangeLog format commit messages, see CONTRIBUTE for
details. One easy way to get the format right is:
C-x v d ; runs vc-dir
m ; mark the file(s) youʼre committing
v ; runs vc-next-action, which pops up a commit buffer,
; where you can write the one-line commit summary,
; and then
C-c C-w ; runs log-edit-generate-changelog-from-diff, which scrapes
; the file and function names from the diff
; fill in the details about the changes
Jesse> ---
Jesse> doc/lispref/display.texi | 5 +++++
Jesse> etc/NEWS | 4 ++++
Jesse> src/buffer.c | 14 ++++++++++++++
Jesse> src/buffer.h | 4 ++++
Jesse> src/xdisp.c | 10 +++++++++-
Jesse> 5 files changed, 36 insertions(+), 1 deletion(-)
Jesse> diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
Jesse> index fd6820897f..875c50c6ef 100644
Jesse> --- a/doc/lispref/display.texi
Jesse> +++ b/doc/lispref/display.texi
Jesse> @@ -2195,6 +2195,11 @@ Line Height
Jesse> number of pixels put below lines. A floating-point number specifies
Jesse> the spacing relative to the frame's default line height.
Jesse> + The @code{line-spacing} parameter creates the space by putting some
Jesse> +margin only below the line. If you wish to center the line
Jesse> vertically
Two spaces after '.'
Jesse> +instead, you can set the variable @code{line-spacing-vertical-center}
Jesse> +as non-nin.
Jesse> +
non-nil
Jesse> diff --git a/src/xdisp.c b/src/xdisp.c
Jesse> index 95895ec3ac..e2c7309f32 100644
Jesse> --- a/src/xdisp.c
Jesse> +++ b/src/xdisp.c
Jesse> @@ -29307,7 +29307,15 @@ gui_produce_glyphs (struct it *it)
Jesse> if (extra_line_spacing > 0)
Jesse> {
Jesse> - it->descent += extra_line_spacing;
Jesse> + if (! NILP (BVAR (XBUFFER (it->w->contents),
Jesse> + line_spacing_vertical_center)))
I think you've inverted the test here, should this not be
if (NILP ....)
?
Robert
next prev parent reply other threads:[~2019-09-30 7:07 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-31 21:53 Patch to vertically center line content when using line-spacing variable Jesse Medeiros
2019-08-31 22:36 ` Stefan Kangas
2019-09-01 0:01 ` Jesse Medeiros
2019-09-03 0:01 ` Jesse Medeiros
2019-09-07 9:50 ` Eli Zaretskii
2019-09-08 23:24 ` Jesse Medeiros
2019-09-09 7:39 ` martin rudalics
2019-09-09 8:40 ` Robert Pluim
2019-09-12 12:08 ` Jesse Medeiros
2019-09-12 14:26 ` Robert Pluim
2019-09-12 20:49 ` Jesse Medeiros
2019-09-13 9:35 ` Robert Pluim
2019-09-29 23:54 ` Jesse Medeiros
2019-09-30 7:07 ` Robert Pluim [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-01-23 16:32 조성빈
2020-01-23 19:22 ` Eli Zaretskii
2020-02-07 17:06 ` Jesse Medeiros
2020-02-07 18:26 ` Eli Zaretskii
2020-04-05 18:55 ` 조성빈 via "Emacs development discussions.
2020-04-06 21:13 ` Jesse Medeiros
2020-04-07 14:17 ` Eli Zaretskii
2021-04-12 20:24 email
2021-04-25 19:41 ` Lars Ingebrigtsen
2021-04-25 20:15 ` john muhl
2021-04-25 20:21 ` Eli Zaretskii
2021-04-25 23:25 ` Fu Yuan
2021-04-25 23:28 ` Stefan Kangas
2021-04-25 23:56 ` Clément Pit-Claudel
2021-04-26 1:00 ` Stefan Kangas
2021-04-26 14:00 ` Clément Pit-Claudel
2021-04-25 23:56 ` Clément Pit-Claudel
2021-04-26 12:35 ` Eli Zaretskii
2021-04-26 20:04 ` Lars Ingebrigtsen
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=m2k19qp8i7.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=jessenzr@gmail.com \
--cc=stefan@marxist.se \
/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).