Created
April 8, 2018 22:43
-
-
Save sebastiencs/2f066f8d12b71f40fda9bdb979fe971d to your computer and use it in GitHub Desktop.
streched spaces in emacs
This file contains 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
diff --git a/src/xdisp.c b/src/xdisp.c | |
index 50fd685778..1ec3b0c376 100644 | |
--- a/src/xdisp.c | |
+++ b/src/xdisp.c | |
@@ -27626,6 +27626,15 @@ produce_stretch_glyph (struct it *it) | |
width = max (0, (int)tem + align_to - it->current_x); | |
zero_width_ok_p = true; | |
} | |
+ else if ((prop = Fplist_get (plist, QCre_align), !NILP (prop))) | |
+ { | |
+ int char_width = FRAME_COLUMN_WIDTH(it->f); | |
+ int streched = it->current_x % char_width; | |
+ width = char_width - streched; | |
+ if (width <= 0) { | |
+ width = char_width; | |
+ } | |
+ } | |
else | |
/* Nothing specified -> width defaults to canonical char width. */ | |
width = FRAME_COLUMN_WIDTH (it->f); | |
@@ -32500,6 +32509,7 @@ They are still logged to the *Messages* buffer. */); | |
DEFSYM (Qcenter, "center"); | |
DEFSYM (Qline_height, "line-height"); | |
DEFSYM (QCalign_to, ":align-to"); | |
+ DEFSYM (QCre_align, ":re-align"); | |
DEFSYM (QCrelative_width, ":relative-width"); | |
DEFSYM (QCrelative_height, ":relative-height"); | |
DEFSYM (QCeval, ":eval"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment