diff src/bidi.c @ 108003:4b71850034e6

* 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.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 20 Apr 2010 13:01:39 -0400
parents bef5d1738c0b
children c964c5fcf1f2
line wrap: on
line diff
--- a/src/bidi.c	Tue Apr 20 12:52:43 2010 -0400
+++ b/src/bidi.c	Tue Apr 20 13:01:39 2010 -0400
@@ -399,20 +399,18 @@
 			  bidi_type[i].to ? bidi_type[i].to : bidi_type[i].from,
 			  make_number (bidi_type[i].type));
 
-  fallback_paragraph_start_re =
-    Fsymbol_value (Fintern_soft (build_string ("paragraph-start"), Qnil));
+  Qparagraph_start = intern ("paragraph-start");
+  staticpro (&Qparagraph_start);
+  fallback_paragraph_start_re = Fsymbol_value (Qparagraph_start);
   if (!STRINGP (fallback_paragraph_start_re))
     fallback_paragraph_start_re = build_string ("\f\\|[ \t]*$");
   staticpro (&fallback_paragraph_start_re);
-  Qparagraph_start = intern ("paragraph-start");
-  staticpro (&Qparagraph_start);
-  fallback_paragraph_separate_re =
-    Fsymbol_value (Fintern_soft (build_string ("paragraph-separate"), Qnil));
+  Qparagraph_separate = intern ("paragraph-separate");
+  staticpro (&Qparagraph_separate);
+  fallback_paragraph_separate_re = Fsymbol_value (Qparagraph_separate);
   if (!STRINGP (fallback_paragraph_separate_re))
     fallback_paragraph_separate_re = build_string ("[ \t\f]*$");
   staticpro (&fallback_paragraph_separate_re);
-  Qparagraph_separate = intern ("paragraph-separate");
-  staticpro (&Qparagraph_separate);
   bidi_initialized = 1;
 }
 
@@ -752,6 +750,7 @@
 static EMACS_INT
 bidi_at_paragraph_end (EMACS_INT charpos, EMACS_INT bytepos)
 {
+  /* FIXME: Why Fbuffer_local_value rather than just Fsymbol_value?  */
   Lisp_Object sep_re = Fbuffer_local_value (Qparagraph_separate,
 					    Fcurrent_buffer ());
   Lisp_Object start_re = Fbuffer_local_value (Qparagraph_start,
@@ -830,6 +829,7 @@
 static EMACS_INT
 bidi_find_paragraph_start (EMACS_INT pos, EMACS_INT pos_byte)
 {
+  /* FIXME: Why Fbuffer_local_value rather than just Fsymbol_value?  */
   Lisp_Object re = Fbuffer_local_value (Qparagraph_start, Fcurrent_buffer ());
   EMACS_INT limit = ZV, limit_byte = ZV_BYTE;