emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 775a3e1 2/6: Merge from origin/emacs-27


From: Glenn Morris
Subject: master 775a3e1 2/6: Merge from origin/emacs-27
Date: Wed, 29 Jul 2020 11:39:41 -0400 (EDT)

branch: master
commit 775a3e19d2c14531055ae8cba21bc6a0a97f6a94
Merge: 5023775 4b3085a
Author: Glenn Morris <rgm@gnu.org>
Commit: Glenn Morris <rgm@gnu.org>

    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
---
 doc/emacs/kmacro.texi | 15 +++++++++++----
 src/composite.c       | 19 ++++++++++++++++---
 src/indent.c          |  4 ++--
 3 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/doc/emacs/kmacro.texi b/doc/emacs/kmacro.texi
index 7e5085c..7b1d365 100644
--- a/doc/emacs/kmacro.texi
+++ b/doc/emacs/kmacro.texi
@@ -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
diff --git a/src/composite.c b/src/composite.c
index 2c589e4..f96f0b7 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -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;
diff --git a/src/indent.c b/src/indent.c
index c0b4c13b..581323b 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -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)
            {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]