aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/buff-menu.el4
-rw-r--r--src/bidi.c14
2 files changed, 8 insertions, 10 deletions
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 00340e5937b..57eab6755c8 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -268,7 +268,7 @@ Letters do not insert themselves; instead, they are commands.
268 (setq truncate-lines t) 268 (setq truncate-lines t)
269 (setq buffer-read-only t) 269 (setq buffer-read-only t)
270 ;; Force L2R direction, to avoid messing the display if the first 270 ;; Force L2R direction, to avoid messing the display if the first
271 ;; buffer in the list happens to begin with a string R2L character. 271 ;; buffer in the list happens to begin with a strong R2L character.
272 (setq bidi-paragraph-direction 'left-to-right)) 272 (setq bidi-paragraph-direction 'left-to-right))
273 273
274(define-obsolete-variable-alias 'buffer-menu-mode-hook 274(define-obsolete-variable-alias 'buffer-menu-mode-hook
@@ -817,7 +817,7 @@ For more information, see the function `buffer-menu'."
817 (erase-buffer) 817 (erase-buffer)
818 (setq standard-output (current-buffer)) 818 (setq standard-output (current-buffer))
819 ;; Force L2R direction, to avoid messing the display if the 819 ;; Force L2R direction, to avoid messing the display if the
820 ;; first buffer in the list happens to begin with a string R2L 820 ;; first buffer in the list happens to begin with a strong R2L
821 ;; character. 821 ;; character.
822 (setq bidi-paragraph-direction 'left-to-right) 822 (setq bidi-paragraph-direction 'left-to-right)
823 (unless Buffer-menu-use-header-line 823 (unless Buffer-menu-use-header-line
diff --git a/src/bidi.c b/src/bidi.c
index 0cd8deb47c0..5c9239d60f0 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -240,8 +240,7 @@ bidi_push_embedding_level (struct bidi_it *bidi_it,
240 int level, bidi_dir_t override) 240 int level, bidi_dir_t override)
241{ 241{
242 bidi_it->stack_idx++; 242 bidi_it->stack_idx++;
243 if (bidi_it->stack_idx >= BIDI_MAXLEVEL) 243 xassert (bidi_it->stack_idx < BIDI_MAXLEVEL);
244 abort ();
245 bidi_it->level_stack[bidi_it->stack_idx].level = level; 244 bidi_it->level_stack[bidi_it->stack_idx].level = level;
246 bidi_it->level_stack[bidi_it->stack_idx].override = override; 245 bidi_it->level_stack[bidi_it->stack_idx].override = override;
247} 246}
@@ -556,9 +555,9 @@ static int bidi_cache_sp;
556 555
557/* Push the bidi iterator state in preparation for reordering a 556/* Push the bidi iterator state in preparation for reordering a
558 different object, e.g. display string found at certain buffer 557 different object, e.g. display string found at certain buffer
559 position. Pushing the bidi iterator boils to saving its entire 558 position. Pushing the bidi iterator boils down to saving its
560 state on the cache and starting a new cache "stacked" on top of the 559 entire state on the cache and starting a new cache "stacked" on top
561 current cache. */ 560 of the current cache. */
562void 561void
563bidi_push_it (struct bidi_it *bidi_it) 562bidi_push_it (struct bidi_it *bidi_it)
564{ 563{
@@ -568,8 +567,7 @@ bidi_push_it (struct bidi_it *bidi_it)
568 memcpy (&bidi_cache[bidi_cache_idx++], bidi_it, sizeof (struct bidi_it)); 567 memcpy (&bidi_cache[bidi_cache_idx++], bidi_it, sizeof (struct bidi_it));
569 568
570 /* Push the current cache start onto the stack. */ 569 /* Push the current cache start onto the stack. */
571 if (bidi_cache_sp >= IT_STACK_SIZE) 570 xassert (bidi_cache_sp < IT_STACK_SIZE);
572 abort ();
573 bidi_cache_start_stack[bidi_cache_sp++] = bidi_cache_start; 571 bidi_cache_start_stack[bidi_cache_sp++] = bidi_cache_start;
574 572
575 /* Start a new level of cache, and make it empty. */ 573 /* Start a new level of cache, and make it empty. */
@@ -2034,7 +2032,7 @@ bidi_move_to_visually_next (struct bidi_it *bidi_it)
2034 } 2032 }
2035 2033
2036 /* The code below can call eval, and thus cause GC. If we are 2034 /* The code below can call eval, and thus cause GC. If we are
2037 iterating a Lisp string, make sure it won't GCed. */ 2035 iterating a Lisp string, make sure it won't be GCed. */
2038 if (STRINGP (bidi_it->string.lstring)) 2036 if (STRINGP (bidi_it->string.lstring))
2039 GCPRO1 (bidi_it->string.lstring); 2037 GCPRO1 (bidi_it->string.lstring);
2040 2038