fix: Handle cons cell value for line-spacing#269
Merged
dgutov merged 1 commit intodgutov:masterfrom Feb 8, 2026
Merged
Conversation
2ea52af to
f423692
Compare
Owner
|
Hi! This is a new feature and the function It would be better to inline the definition. |
The `line-spacing` variable can be a [cons cell][1] from Emacs 31, such as `(0.1 . 0.1)`, in addition to a plain number. Each value in this cons is spacing above and below the line. The correct value of line-spacing would be to use [`total-line-spacing`][1] instead of raw value. The previous code did not handle the cons cell format, leading to a `wrong-type-argument` error. For backward compatibility, this change inlines the definition of `total-line-spacing` i.e. sums the above and below spacing in case if it's cons. [1]: emacs-mirror/emacs@e8f26d5
f423692 to
82693fa
Compare
Contributor
Author
|
Inlined the definition. Thanks for the suggestion. |
Owner
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
line-spacingvariable can be a cons cell from Emacs 31, suchas
(0.1 . 0.1), in addition to a plain number. Each value in this consis spacing above and below the line. The correct value of line-spacing
would be to use
total-line-spacinginstead of raw value.The previous code did not handle the cons cell format, leading to a
wrong-type-argumenterror. For backward compatibility, this changeinlines the definition of
total-line-spacingi.e. sums the above andbelow spacing in case if it's cons.