emacs/doc/lispref
Daniel Mendler e8f26d554b Support cons cell for 'line-spacing'
* etc/NEWS: Announce the change.
* src/dispextern.h (struct glyph_row): Add
'extra_line_spacing_above' member.
(struct it): Add 'extra_line_spacing_above' member.
* src/frame.h (struct frame): Add 'extra_line_spacing_above'
member.  Update comment for 'extra_line_spacing.'
* src/buffer.c (syms_of_buffer): Update the docstring of
'line-spacing' to describe the cons cell usage.
* src/buffer.h (struct buffer): Update comment for
'extra_line_spacing'.
* src/frame.c (gui_set_line_spacing): Handle cons cell value for
'line-spacing'.  Calculate and set 'extra_line_spacing_above'
for both integer and float pairs.
* src/xdisp.c (init_iterator): Initialize 'extra_line_spacing_above'
from buffer or frame 'line-spacing', handling cons cells for both
integer and float values.
(gui_produce_glyphs): Use 'extra_line_spacing_above' to distribute
spacing between ascent and descent.  Update 'max_extra_line_spacing'
calculation.
(resize_mini_window): Take line spacing into account when resizing the
mini window.  Pass height of a single line to 'grow_mini_window' and
'shrink_mini_window'.
* src/window.c (grow_mini_window, shrink_mini_window): Add unit
argument which defines height of a single line.
* src/window.h (grow_mini_window, shrink_mini_window): Adjust function
prototypes accordingly with unit argument.
* lisp/subr.el (total-line-spacing): New function to calculate total
spacing from a number or cons cell.
(posn-col-row): Use total-line-spacing.
* lisp/simple.el (default-line-height): Use 'total-line-spacing'.
* lisp/textmodes/picture.el (picture-mouse-set-point): Use
'total-line-spacing'.
* lisp/window.el (window-default-line-height): Use
'total-line-spacing'.
(window--resize-mini-window): Take 'line-spacing' into account.
* test/lisp/subr-tests.el (total-line-spacing): New test.
* test/src/buffer-tests.el (test-line-spacing): New test.
* doc/emacs/display.texi (Display Custom): Document that
'line-spacing' can be a cons cell.
(Line Height): Document the new cons cell format for 'line-spacing'
to allow vertical centering.

Co-authored-by: Przemysław Alexander Kamiński <alexander@kaminski.se>
Co-authored-by: Daniel Mendler <mail@daniel-mendler.de>
2026-01-24 13:32:44 +02:00
..
abbrevs.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
anti.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
back.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
backups.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
book-spine.texi Fix single-quoting style in PDF manuals 2015-05-01 12:06:38 -07:00
buffers.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
ChangeLog.1 ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
commands.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
compile.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
control.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
customize.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
debugging.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
display.texi Support cons cell for 'line-spacing' 2026-01-24 13:32:44 +02:00
doclicense.texi Merge from Gnulib 2017-10-01 18:31:10 -07:00
edebug.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
elisp.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
elisp_type_hierarchy.jpg Run admin/syncdoc-type-hierarchy.el 2024-04-23 15:39:28 +02:00
elisp_type_hierarchy.txt Run admin/syncdoc-type-hierarchy.el 2024-04-23 15:39:28 +02:00
errors.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
eval.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
files.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
frames.texi Add frame identifiers (bug#80138) 2026-01-13 09:29:44 +01:00
functions.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
gpl.texi Merge from Gnulib 2017-10-01 18:31:10 -07:00
hash.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
help.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
hooks.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
index.texi
internals.texi ; * doc/lispref/internals.texi (Garbage Collection): typo 2026-01-21 12:45:44 +01:00
intro.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
keymaps.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
lay-flat.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
lists.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
loading.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
macros.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
Makefile.in ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
maps.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
markers.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
minibuf.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
modes.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
nonascii.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
numbers.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
objects.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
os.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
package.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
parsing.texi ; Fix documentation of recent treesit changes 2026-01-02 14:48:58 +02:00
peg.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
positions.texi In Elisp manual warn about unpredictable changes of point (Bug#79927) 2026-01-05 09:29:09 +01:00
processes.texi ; Consistently use "window point" and "buffer point" in Elisp manual 2026-01-06 09:52:04 +01:00
README ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
records.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
searching.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
sequences.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
spellfile Make 'purecopy' an obsolete function alias for 'identity' 2024-12-12 22:48:21 +01:00
streams.texi ; * doc/lispref/streams.texi (Output Functions): Fix markup (bug#80167). 2026-01-10 12:18:47 +02:00
strings.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
symbols.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
syntax.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
text.texi Jsonrpc: don't let remote endpoint requests go unanswered 2026-01-21 12:26:24 +00:00
threads.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
tips.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
two-volume-cross-refs.txt ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
two-volume.make ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
variables.texi ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
windows.texi ; Consistently use "window point" and "buffer point" in Elisp manual 2026-01-06 09:52:04 +01:00

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Copyright (C) 2001-2026 Free Software Foundation, Inc.  -*- outline -*-
See the end of the file for license conditions.


README for the Emacs Lisp Reference Manual.

* This directory contains the texinfo source files for the Emacs Lisp
Reference Manual.

* Report bugs in the Lisp Manual (or in Emacs) using M-x report-emacs-bug.
To ask questions, use the help-gnu-emacs mailing list.

* The Emacs Lisp Reference Manual is quite large.  It totals around
1100 pages in smallbook format; the info files total around 3.0 megabytes.

* You can format this manual for Info, for printing hardcopy using TeX,
or for HTML.

* You can buy nicely printed copies from the Free Software Foundation.
Buying a manual from the Free Software Foundation helps support our GNU
development work.  See <https://shop.fsf.org/>.
(At time of writing, this manual is out of print.)

* The master file for formatting this manual for Tex is called 'elisp.texi'.
It contains @include commands to include all the chapters that make up
the manual.

* This distribution contains a Makefile that you can use with GNU Make.

** To make an Info file, you need to install Texinfo, then run 'make info'.

** Use 'make elisp.pdf' or 'make elisp.html' to create PDF or HTML versions.


This file is part of GNU Emacs.

GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.