Merge from origin/emacs-27

4b3085a7fe Fix last change
efdd4632c9 Fix Arabic shaping when column-number-mode is in effect
d5acc50941 Fix description of kmacro-* commands in the user manual
This commit is contained in:
Glenn Morris 2020-07-29 08:38:51 -07:00
commit 775a3e19d2
3 changed files with 29 additions and 9 deletions

View file

@ -49,23 +49,30 @@ intelligent or general. For such things, Lisp must be used.
@table @kbd
@item @key{F3}
@itemx C-x (
Start defining a keyboard macro
(@code{kmacro-start-macro-or-insert-counter}).
@item @key{F4}
@itemx C-x e
If a keyboard macro is being defined, end the definition; otherwise,
execute the most recent keyboard macro
(@code{kmacro-end-or-call-macro}).
@item C-u @key{F3}
@itemx C-u C-x (
Re-execute last keyboard macro, then append keys to its definition.
@item C-u C-u @key{F3}
@itemx C-u C-u C-x (
Append keys to the last keyboard macro without re-executing it.
@item C-x C-k r
Run the last keyboard macro on each line that begins in the region
(@code{apply-macro-to-region-lines}).
@item C-x (
Start defining a keyboard macro (old style)
(@code{kmacro-start-macro}); with a prefix argument, append keys to
the last macro.
@item C-x )
End a macro definition (old style) (@code{kmacro-end-macro}); prefix
argument serves as the repeat count for executing the macro.
@item C-x e
Execute the most recently defined keyboard macro
(@code{kmacro-end-and-call-macro}); prefix argument serves as repeat
count.
@end table
@kindex F3

View file

@ -1167,7 +1167,9 @@ composition_compute_stop_pos (struct composition_it *cmp_it, ptrdiff_t charpos,
character to check, and CHARPOS and BYTEPOS are indices in the
string. In that case, FACE must not be NULL. BIDI_LEVEL is the bidi
embedding level of the current paragraph, and is used to calculate the
direction argument to pass to the font shaper.
direction argument to pass to the font shaper; value of -1 means the
caller doesn't know the embedding level (used by callers which didn't
invoke the display routines that perform bidi-display-reordering).
If the character is composed, setup members of CMP_IT (id, nglyphs,
from, to, reversed_p), and return true. Otherwise, update
@ -1213,7 +1215,9 @@ composition_reseat_it (struct composition_it *cmp_it, ptrdiff_t charpos,
continue;
if (charpos < endpos)
{
if ((bidi_level & 1) == 0)
if (bidi_level < 0)
direction = Qnil;
else if ((bidi_level & 1) == 0)
direction = QL2R;
else
direction = QR2L;
@ -1250,7 +1254,16 @@ composition_reseat_it (struct composition_it *cmp_it, ptrdiff_t charpos,
else
bpos = CHAR_TO_BYTE (cpos);
}
if ((bidi_level & 1) == 0)
/* The bidi_level < 0 case below strictly speaking should
never happen, since we get here when bidi scan direction
is backward in the buffer, which can only happen if the
display routines were called to perform the bidi
reordering. But it doesn't harm to test for that, and
avoid someon raising their brows and thinking it's a
subtle bug... */
if (bidi_level < 0)
direction = Qnil;
else if ((bidi_level & 1) == 0)
direction = QL2R;
else
direction = QR2L;

View file

@ -596,7 +596,7 @@ scan_for_column (ptrdiff_t *endpos, EMACS_INT *goalcol, ptrdiff_t *prevcol)
if (cmp_it.id >= 0
|| (scan == cmp_it.stop_pos
&& composition_reseat_it (&cmp_it, scan, scan_byte, end,
w, NEUTRAL_DIR, NULL, Qnil)))
w, -1, NULL, Qnil)))
composition_update_it (&cmp_it, scan, scan_byte, Qnil);
if (cmp_it.id >= 0)
{
@ -1504,7 +1504,7 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos,
if (cmp_it.id >= 0
|| (pos == cmp_it.stop_pos
&& composition_reseat_it (&cmp_it, pos, pos_byte, to, win,
NEUTRAL_DIR, NULL, Qnil)))
-1, NULL, Qnil)))
composition_update_it (&cmp_it, pos, pos_byte, Qnil);
if (cmp_it.id >= 0)
{