[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117623: Merge from emacs-24; up to r117418.
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] trunk r117623: Merge from emacs-24; up to r117418. |
Date: |
Fri, 01 Aug 2014 13:10:22 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117623 [merge]
revision-id: address@hidden
parent: address@hidden
parent: address@hidden
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2014-08-01 16:10:07 +0300
message:
Merge from emacs-24; up to r117418.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/tutorial.el
tutorial.el-20091113204419-o5vbwnq5f7feedwu-4434
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/macros.c macros.c-20091113204419-o5vbwnq5f7feedwu-217
src/xdisp.c xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-08-01 00:18:19 +0000
+++ b/lisp/ChangeLog 2014-08-01 13:10:07 +0000
@@ -1,3 +1,8 @@
+2014-07-29 Eli Zaretskii <address@hidden>
+
+ * tutorial.el (tutorial--display-changes): Accept punctuation
+ characters before the key binding. (Bug#18146)
+
2014-07-31 Fabián Ezequiel Gallina <address@hidden>
* progmodes/python.el: Shell output capture enhancements.
=== modified file 'lisp/tutorial.el'
--- a/lisp/tutorial.el 2014-02-10 01:34:22 +0000
+++ b/lisp/tutorial.el 2014-07-29 13:41:50 +0000
@@ -548,7 +548,11 @@
(start (point))
(case-fold-search nil)
(keybindings-regexp
- (concat "[[:space:]]\\("
+ ;; Accept either [:space:] or [:punct:] before the key
+ ;; binding because the Hebrew tutorial uses directional
+ ;; controls and Hebrew character maqaf, the Hebrew hyphen,
+ ;; immediately before the binding string.
+ (concat "\\([[:space:]]\\|[[:punct:]]\\)\\("
(mapconcat (lambda (kdf) (regexp-quote
(tutorial--key-description
(nth 1 kdf))))
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-08-01 06:52:02 +0000
+++ b/src/ChangeLog 2014-08-01 13:10:07 +0000
@@ -1,3 +1,35 @@
+2014-08-01 Eli Zaretskii <address@hidden>
+
+ Fix display of R2L lines when the last character fits only partially.
+ See http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00476.html
+ for the details.
+ * xdisp.c (extend_face_to_end_of_line): If the last glyph of an
+ R2L row is visible only partially, give the row a negative x
+ offset.
+ (display_line): Fix the calculation of the glyph whose pixel width
+ is used to decide whether the last produced glyph fits on the
+ line. When the last glyph fits only partially, give the row a
+ negative x offset.
+
+ Fix hscroll of R2L lines that begin with a TAB or another wide glyph.
+ * xdisp.c (append_stretch_glyph): In a R2L glyph row, decrease the
+ pixel width of the first glyph that is hscrolled from display.
+ (display_line): In R2L glyph rows, don't give a negative offset to
+ row->x when the first glyph begins before first_visible_x.
+
+ * xdisp.c (display_line): If called with iterator set up to write
+ to a marginal area, delay the call to handle_line_prefix until we
+ switch back to the text area. (Bug#18035)
+
+ * .gdbinit (xwindow): The members total_cols, total_lines,
+ left_col, and top_line are C integers (and has been so for the
+ last 1.5 years).
+
+2014-08-01 Andreas Schwab <address@hidden>
+
+ * macros.c (Fstart_kbd_macro): Initialize kbd_macro_ptr and
+ kbd_macro_end together with kbd_macro_buffer. (Bug#18140)
+
2014-08-01 Dmitry Antipov <address@hidden>
* atimer.c (toplevel) [HAVE_TIMERFD]: Include errno.h.
=== modified file 'src/macros.c'
--- a/src/macros.c 2014-07-14 19:07:54 +0000
+++ b/src/macros.c 2014-08-01 13:10:07 +0000
@@ -63,6 +63,8 @@
{
current_kboard->kbd_macro_buffer = xmalloc (30 * word_size);
current_kboard->kbd_macro_bufsize = 30;
+ current_kboard->kbd_macro_ptr = current_kboard->kbd_macro_buffer;
+ current_kboard->kbd_macro_end = current_kboard->kbd_macro_buffer;
}
update_mode_lines = 19;
if (NILP (append))
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2014-07-27 13:21:30 +0000
+++ b/src/xdisp.c 2014-08-01 13:10:07 +0000
@@ -19337,6 +19337,12 @@
it->face_id = saved_face_id;
it->start_of_box_run_p = saved_box_start;
}
+ /* If stretch_width comes out negative, it means that the
+ last glyph is only partially visible. In R2L rows, we
+ want the leftmost glyph to be partially visible, so we
+ need to give the row the corresponding left offset. */
+ if (stretch_width < 0)
+ it->glyph_row->x = stretch_width;
}
#endif /* HAVE_WINDOW_SYSTEM */
}
@@ -19963,6 +19969,7 @@
int cvpos;
ptrdiff_t min_pos = ZV + 1, max_pos = 0;
ptrdiff_t min_bpos IF_LINT (= 0), max_bpos IF_LINT (= 0);
+ bool pending_handle_line_prefix = false;
/* We always start displaying at hpos zero even if hscrolled. */
eassert (it->hpos == 0 && it->current_x == 0);
@@ -20023,13 +20030,23 @@
min_pos = CHARPOS (this_line_min_pos);
min_bpos = BYTEPOS (this_line_min_pos);
}
- else
+ else if (it->area == TEXT_AREA)
{
- /* We only do this when not calling `move_it_in_display_line_to'
- above, because move_it_in_display_line_to calls
- handle_line_prefix itself. */
+ /* We only do this when not calling move_it_in_display_line_to
+ above, because that function calls itself handle_line_prefix. */
handle_line_prefix (it);
}
+ else
+ {
+ /* Line-prefix and wrap-prefix are always displayed in the text
+ area. But if this is the first call to display_line after
+ init_iterator, the iterator might have been set up to write
+ into a marginal area, e.g. if the line begins with some
+ display property that writes to the margins. So we need to
+ wait with the call to handle_line_prefix until whatever
+ writes to the margin has done its job. */
+ pending_handle_line_prefix = true;
+ }
/* Get the initial row height. This is either the height of the
text hscrolled, if there is any, or zero. */
@@ -20161,6 +20178,14 @@
row->extra_line_spacing = max (row->extra_line_spacing,
it->max_extra_line_spacing);
set_iterator_to_next (it, 1);
+ /* If we didn't handle the line/wrap prefix above, and the
+ call to set_iterator_to_next just switched to TEXT_AREA,
+ process the prefix now. */
+ if (it->area == TEXT_AREA && pending_handle_line_prefix)
+ {
+ pending_handle_line_prefix = false;
+ handle_line_prefix (it);
+ }
continue;
}
@@ -20190,7 +20215,12 @@
it->max_phys_ascent + it->max_phys_descent);
row->extra_line_spacing = max (row->extra_line_spacing,
it->max_extra_line_spacing);
- if (it->current_x - it->pixel_width < it->first_visible_x)
+ if (it->current_x - it->pixel_width < it->first_visible_x
+ /* In R2L rows, we arrange in extend_face_to_end_of_line
+ to add a right offset to the line, by a suitable
+ change to the stretch glyph that is the leftmost
+ glyph of the line. */
+ && !row->reversed_p)
row->x = x - it->first_visible_x;
/* Record the maximum and minimum buffer positions seen so
far in glyphs that will be displayed by this row. */
@@ -20204,7 +20234,13 @@
for (i = 0; i < nglyphs; ++i, x = new_x)
{
- glyph = row->glyphs[TEXT_AREA] + n_glyphs_before + i;
+ /* Identify the glyphs added by the last call to
+ PRODUCE_GLYPHS. In R2L rows, they are prepended to
+ the previous glyphs. */
+ if (!row->reversed_p)
+ glyph = row->glyphs[TEXT_AREA] + n_glyphs_before + i;
+ else
+ glyph = row->glyphs[TEXT_AREA] + nglyphs - 1 - i;
new_x = x + glyph->pixel_width;
if (/* Lines are continued. */
@@ -20404,10 +20440,20 @@
if (it->bidi_p)
RECORD_MAX_MIN_POS (it);
- if (x < it->first_visible_x)
+ if (x < it->first_visible_x && !row->reversed_p)
/* Glyph is partially visible, i.e. row starts at
- negative X position. */
+ negative X position. Don't do that in R2L
+ rows, where we arrange to add a right offset to
+ the line in extend_face_to_end_of_line, by a
+ suitable change to the stretch glyph that is
+ the leftmost glyph of the line. */
row->x = x - it->first_visible_x;
+ /* When the last glyph of an R2L row only fits
+ partially on the line, we need to set row->x to a
+ negative offset, so that the leftmost glyph is
+ the one that is partially visible. */
+ if (row->reversed_p && new_x > it->last_visible_x)
+ row->x = it->last_visible_x - new_x;
}
else
{
@@ -25305,6 +25351,24 @@
for (g = glyph - 1; g >= it->glyph_row->glyphs[area]; g--)
g[1] = *g;
glyph = it->glyph_row->glyphs[area];
+
+ /* Decrease the width of the first glyph of the row that
+ begins before first_visible_x (e.g., due to hscroll).
+ This is so the overall width of the row becomes smaller
+ by the scroll amount, and the stretch glyph appended by
+ extend_face_to_end_of_line will be wider, to shift the
+ row glyphs to the right. (In L2R rows, the corresponding
+ left-shift effect is accomplished by setting row->x to a
+ negative value, which won't work with R2L rows.)
+
+ This must leave us with a positive value of WIDTH, since
+ otherwise the call to move_it_in_display_line_to at the
+ beginning of display_line would have got past the entire
+ first glyph, and then it->current_x would have been
+ greater or equal to it->first_visible_x. */
+ if (it->current_x < it->first_visible_x)
+ width -= it->first_visible_x - it->current_x;
+ eassert (width > 0);
}
glyph->charpos = CHARPOS (it->position);
glyph->object = object;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117623: Merge from emacs-24; up to r117418.,
Eli Zaretskii <=