aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2010-04-20 13:01:39 -0400
committerStefan Monnier2010-04-20 13:01:39 -0400
commitb4bf28b732a4d8d4deaa18f1bc7e2078b8febeec (patch)
tree1150e65ec3df16104f22e433509fa61f25e3e196 /src
parentcb4f951325583593304626961b9ef30e8eb9ca57 (diff)
downloademacs-b4bf28b732a4d8d4deaa18f1bc7e2078b8febeec.tar.gz
emacs-b4bf28b732a4d8d4deaa18f1bc7e2078b8febeec.zip
* buffer.h (struct buffer): Remove unused var `direction_reversed'.
* buffer.c (init_buffer_once, syms_of_buffer): Remove its initialization. * bidi.c (bidi_initialize): Simplify fallback_paragraph_*_re init.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/bidi.c16
-rw-r--r--src/buffer.c11
-rw-r--r--src/buffer.h3
-rw-r--r--src/dispextern.h1
5 files changed, 18 insertions, 20 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 481588e5acc..2ff8e87dc70 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12010-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * buffer.h (struct buffer): Remove unused var `direction_reversed'.
4 * buffer.c (init_buffer_once, syms_of_buffer): Remove its initialization.
5
6 * bidi.c (bidi_initialize): Simplify fallback_paragraph_*_re init.
7
12010-04-20 Eli Zaretskii <eliz@gnu.org> 82010-04-20 Eli Zaretskii <eliz@gnu.org>
2 9
3 Fix R2L paragraph display on TTY. 10 Fix R2L paragraph display on TTY.
diff --git a/src/bidi.c b/src/bidi.c
index fee97ae0c8e..12729c7ab10 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -399,20 +399,18 @@ bidi_initialize ()
399 bidi_type[i].to ? bidi_type[i].to : bidi_type[i].from, 399 bidi_type[i].to ? bidi_type[i].to : bidi_type[i].from,
400 make_number (bidi_type[i].type)); 400 make_number (bidi_type[i].type));
401 401
402 fallback_paragraph_start_re = 402 Qparagraph_start = intern ("paragraph-start");
403 Fsymbol_value (Fintern_soft (build_string ("paragraph-start"), Qnil)); 403 staticpro (&Qparagraph_start);
404 fallback_paragraph_start_re = Fsymbol_value (Qparagraph_start);
404 if (!STRINGP (fallback_paragraph_start_re)) 405 if (!STRINGP (fallback_paragraph_start_re))
405 fallback_paragraph_start_re = build_string ("\f\\|[ \t]*$"); 406 fallback_paragraph_start_re = build_string ("\f\\|[ \t]*$");
406 staticpro (&fallback_paragraph_start_re); 407 staticpro (&fallback_paragraph_start_re);
407 Qparagraph_start = intern ("paragraph-start"); 408 Qparagraph_separate = intern ("paragraph-separate");
408 staticpro (&Qparagraph_start); 409 staticpro (&Qparagraph_separate);
409 fallback_paragraph_separate_re = 410 fallback_paragraph_separate_re = Fsymbol_value (Qparagraph_separate);
410 Fsymbol_value (Fintern_soft (build_string ("paragraph-separate"), Qnil));
411 if (!STRINGP (fallback_paragraph_separate_re)) 411 if (!STRINGP (fallback_paragraph_separate_re))
412 fallback_paragraph_separate_re = build_string ("[ \t\f]*$"); 412 fallback_paragraph_separate_re = build_string ("[ \t\f]*$");
413 staticpro (&fallback_paragraph_separate_re); 413 staticpro (&fallback_paragraph_separate_re);
414 Qparagraph_separate = intern ("paragraph-separate");
415 staticpro (&Qparagraph_separate);
416 bidi_initialized = 1; 414 bidi_initialized = 1;
417} 415}
418 416
@@ -752,6 +750,7 @@ bidi_peek_at_next_level (struct bidi_it *bidi_it)
752static EMACS_INT 750static EMACS_INT
753bidi_at_paragraph_end (EMACS_INT charpos, EMACS_INT bytepos) 751bidi_at_paragraph_end (EMACS_INT charpos, EMACS_INT bytepos)
754{ 752{
753 /* FIXME: Why Fbuffer_local_value rather than just Fsymbol_value? */
755 Lisp_Object sep_re = Fbuffer_local_value (Qparagraph_separate, 754 Lisp_Object sep_re = Fbuffer_local_value (Qparagraph_separate,
756 Fcurrent_buffer ()); 755 Fcurrent_buffer ());
757 Lisp_Object start_re = Fbuffer_local_value (Qparagraph_start, 756 Lisp_Object start_re = Fbuffer_local_value (Qparagraph_start,
@@ -830,6 +829,7 @@ bidi_line_init (struct bidi_it *bidi_it)
830static EMACS_INT 829static EMACS_INT
831bidi_find_paragraph_start (EMACS_INT pos, EMACS_INT pos_byte) 830bidi_find_paragraph_start (EMACS_INT pos, EMACS_INT pos_byte)
832{ 831{
832 /* FIXME: Why Fbuffer_local_value rather than just Fsymbol_value? */
833 Lisp_Object re = Fbuffer_local_value (Qparagraph_start, Fcurrent_buffer ()); 833 Lisp_Object re = Fbuffer_local_value (Qparagraph_start, Fcurrent_buffer ());
834 EMACS_INT limit = ZV, limit_byte = ZV_BYTE; 834 EMACS_INT limit = ZV, limit_byte = ZV_BYTE;
835 835
diff --git a/src/buffer.c b/src/buffer.c
index 9932c649044..4966c322286 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5175,7 +5175,6 @@ init_buffer_once ()
5175 buffer_defaults.word_wrap = Qnil; 5175 buffer_defaults.word_wrap = Qnil;
5176 buffer_defaults.ctl_arrow = Qt; 5176 buffer_defaults.ctl_arrow = Qt;
5177 buffer_defaults.bidi_display_reordering = Qnil; 5177 buffer_defaults.bidi_display_reordering = Qnil;
5178 buffer_defaults.direction_reversed = Qnil;
5179 buffer_defaults.bidi_paragraph_direction = Qnil; 5178 buffer_defaults.bidi_paragraph_direction = Qnil;
5180 buffer_defaults.cursor_type = Qt; 5179 buffer_defaults.cursor_type = Qt;
5181 buffer_defaults.extra_line_spacing = Qnil; 5180 buffer_defaults.extra_line_spacing = Qnil;
@@ -5262,7 +5261,6 @@ init_buffer_once ()
5262 XSETFASTINT (buffer_local_flags.cache_long_line_scans, idx); ++idx; 5261 XSETFASTINT (buffer_local_flags.cache_long_line_scans, idx); ++idx;
5263 XSETFASTINT (buffer_local_flags.category_table, idx); ++idx; 5262 XSETFASTINT (buffer_local_flags.category_table, idx); ++idx;
5264 XSETFASTINT (buffer_local_flags.bidi_display_reordering, idx); ++idx; 5263 XSETFASTINT (buffer_local_flags.bidi_display_reordering, idx); ++idx;
5265 XSETFASTINT (buffer_local_flags.direction_reversed, idx); ++idx;
5266 XSETFASTINT (buffer_local_flags.bidi_paragraph_direction, idx); ++idx; 5264 XSETFASTINT (buffer_local_flags.bidi_paragraph_direction, idx); ++idx;
5267 XSETFASTINT (buffer_local_flags.buffer_file_coding_system, idx); 5265 XSETFASTINT (buffer_local_flags.buffer_file_coding_system, idx);
5268 /* Make this one a permanent local. */ 5266 /* Make this one a permanent local. */
@@ -5784,11 +5782,6 @@ The variable `coding-system-for-write', if non-nil, overrides this variable.
5784 5782
5785This variable is never applied to a way of decoding a file while reading it. */); 5783This variable is never applied to a way of decoding a file while reading it. */);
5786 5784
5787 DEFVAR_PER_BUFFER ("direction-reversed",
5788 &current_buffer->direction_reversed, Qnil,
5789 doc: /* Non-nil means set beginning of lines at the right edge of the window.
5790See also the variable `bidi-display-reordering'. */);
5791
5792 DEFVAR_PER_BUFFER ("bidi-display-reordering", 5785 DEFVAR_PER_BUFFER ("bidi-display-reordering",
5793 &current_buffer->bidi_display_reordering, Qnil, 5786 &current_buffer->bidi_display_reordering, Qnil,
5794 doc: /* Non-nil means reorder bidirectional text for display in the visual order. 5787 doc: /* Non-nil means reorder bidirectional text for display in the visual order.
@@ -5797,12 +5790,12 @@ See also the variable `direction-reversed'. */);
5797 DEFVAR_PER_BUFFER ("bidi-paragraph-direction", 5790 DEFVAR_PER_BUFFER ("bidi-paragraph-direction",
5798 &current_buffer->bidi_paragraph_direction, Qnil, 5791 &current_buffer->bidi_paragraph_direction, Qnil,
5799 doc: /* *If non-nil, forces directionality of text paragraphs in the buffer. 5792 doc: /* *If non-nil, forces directionality of text paragraphs in the buffer.
5800 5793
5801If this is nil (the default), the direction of each paragraph is 5794If this is nil (the default), the direction of each paragraph is
5802determined by the first strong directional character of its text. 5795determined by the first strong directional character of its text.
5803The values of `right-to-left' and `left-to-right' override that. 5796The values of `right-to-left' and `left-to-right' override that.
5804Any other value is treated as nil. 5797Any other value is treated as nil.
5805 5798
5806This variable has no effect unless the buffer's value of 5799This variable has no effect unless the buffer's value of
5807\`bidi-display-reordering' is non-nil. */); 5800\`bidi-display-reordering' is non-nil. */);
5808 5801
diff --git a/src/buffer.h b/src/buffer.h
index b750e490078..d03152abd85 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -679,9 +679,6 @@ struct buffer
679 /* Non-nil means reorder bidirectional text for display in the 679 /* Non-nil means reorder bidirectional text for display in the
680 visual order. */ 680 visual order. */
681 Lisp_Object bidi_display_reordering; 681 Lisp_Object bidi_display_reordering;
682 /* Non-nil means set beginning of lines at the right edge of
683 windows. */
684 Lisp_Object direction_reversed;
685 /* If non-nil, specifies which direction of text to force in all the 682 /* If non-nil, specifies which direction of text to force in all the
686 paragraphs of the buffer. Nil means determine paragraph 683 paragraphs of the buffer. Nil means determine paragraph
687 direction dynamically for each paragraph. */ 684 direction dynamically for each paragraph. */
diff --git a/src/dispextern.h b/src/dispextern.h
index b0a072f71f8..d60616a9088 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1956,6 +1956,7 @@ enum it_method {
1956 NUM_IT_METHODS 1956 NUM_IT_METHODS
1957}; 1957};
1958 1958
1959/* FIXME: What is this? Why 5? */
1959#define IT_STACK_SIZE 5 1960#define IT_STACK_SIZE 5
1960 1961
1961/* Iterator for composition (both for static and automatic). */ 1962/* Iterator for composition (both for static and automatic). */