aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-03-06 11:53:35 -0800
committerPaul Eggert2011-03-06 11:53:35 -0800
commit9f36b9fd38fb4bde2ac4664f05a65e2dd973add2 (patch)
treeea503f7ea97e81b3b8d8054af465fab235ff2b16 /src
parent367c19e58bd4ccf47dd0ce018002b2ae4e12f949 (diff)
downloademacs-9f36b9fd38fb4bde2ac4664f05a65e2dd973add2.tar.gz
emacs-9f36b9fd38fb4bde2ac4664f05a65e2dd973add2.zip
* xdisp.c (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
avoids a gcc -Wuninitialized diagnostic.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog2
-rw-r--r--src/xdisp.c15
2 files changed, 7 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 94ce2a9f6ce..8582bf67e04 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -2,6 +2,8 @@
2 2
3 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff. 3 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
4 Add a FIXME comment, since the code still doesn't look right. 4 Add a FIXME comment, since the code still doesn't look right.
5 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
6 avoids a gcc -Wuninitialized diagnostic.
5 7
6 current_column: Now returns EMACS_INT, fixing some iftc. 8 current_column: Now returns EMACS_INT, fixing some iftc.
7 * bytecode.c (Fbyte_code): Don't cast current_column () to int. 9 * bytecode.c (Fbyte_code): Don't cast current_column () to int.
diff --git a/src/xdisp.c b/src/xdisp.c
index 44a317b5785..174312ccab3 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -17912,16 +17912,13 @@ paragraphs, text begins at the right margin and is read from right to left.
17912See also `bidi-paragraph-direction'. */) 17912See also `bidi-paragraph-direction'. */)
17913 (Lisp_Object buffer) 17913 (Lisp_Object buffer)
17914{ 17914{
17915 struct buffer *buf; 17915 struct buffer *buf = current_buffer;
17916 struct buffer *old; 17916 struct buffer *old = buf;
17917 17917
17918 if (NILP (buffer)) 17918 if (! NILP (buffer))
17919 buf = current_buffer;
17920 else
17921 { 17919 {
17922 CHECK_BUFFER (buffer); 17920 CHECK_BUFFER (buffer);
17923 buf = XBUFFER (buffer); 17921 buf = XBUFFER (buffer);
17924 old = current_buffer;
17925 } 17922 }
17926 17923
17927 if (NILP (BVAR (buf, bidi_display_reordering))) 17924 if (NILP (BVAR (buf, bidi_display_reordering)))
@@ -17938,8 +17935,7 @@ See also `bidi-paragraph-direction'. */)
17938 EMACS_INT bytepos = BUF_PT_BYTE (buf); 17935 EMACS_INT bytepos = BUF_PT_BYTE (buf);
17939 int c; 17936 int c;
17940 17937
17941 if (buf != current_buffer) 17938 set_buffer_temp (buf);
17942 set_buffer_temp (buf);
17943 /* bidi_paragraph_init finds the base direction of the paragraph 17939 /* bidi_paragraph_init finds the base direction of the paragraph
17944 by searching forward from paragraph start. We need the base 17940 by searching forward from paragraph start. We need the base
17945 direction of the current or _previous_ paragraph, so we need 17941 direction of the current or _previous_ paragraph, so we need
@@ -17967,8 +17963,7 @@ See also `bidi-paragraph-direction'. */)
17967 itb.paragraph_dir = NEUTRAL_DIR; 17963 itb.paragraph_dir = NEUTRAL_DIR;
17968 17964
17969 bidi_paragraph_init (NEUTRAL_DIR, &itb, 1); 17965 bidi_paragraph_init (NEUTRAL_DIR, &itb, 1);
17970 if (buf != current_buffer) 17966 set_buffer_temp (old);
17971 set_buffer_temp (old);
17972 switch (itb.paragraph_dir) 17967 switch (itb.paragraph_dir)
17973 { 17968 {
17974 case L2R: 17969 case L2R: