emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/src ChangeLog xdisp.c


From: Chong Yidong
Subject: [Emacs-diffs] emacs/src ChangeLog xdisp.c
Date: Sat, 05 Dec 2009 22:49:02 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      09/12/05 22:49:02

Modified files:
        src            : ChangeLog xdisp.c 

Log message:
        * xdisp.c (push_display_prop): Don't set avoid_cursor_p.  Return 0
        if push failed.
        (handle_line_prefix): Set avoid_cursor_p here.  Check return value
        of push_display_prop (Bug#5000).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ChangeLog?cvsroot=emacs&r1=1.7910&r2=1.7911
http://cvs.savannah.gnu.org/viewcvs/emacs/src/xdisp.c?cvsroot=emacs&r1=1.1325&r2=1.1326

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7910
retrieving revision 1.7911
diff -u -b -r1.7910 -r1.7911
--- ChangeLog   5 Dec 2009 20:16:42 -0000       1.7910
+++ ChangeLog   5 Dec 2009 22:49:00 -0000       1.7911
@@ -1,5 +1,10 @@
 2009-12-05  Chong Yidong  <address@hidden>
 
+       * xdisp.c (push_display_prop): Don't set avoid_cursor_p.  Return 0
+       if push failed.
+       (handle_line_prefix): Set avoid_cursor_p here.  Check return value
+       of push_display_prop (Bug#5000).
+
        * xfaces.c (Fx_family_fonts): Handle 2009-07-14 change to return
        value of font_list_entities (Bug#5085).
 

Index: xdisp.c
===================================================================
RCS file: /sources/emacs/emacs/src/xdisp.c,v
retrieving revision 1.1325
retrieving revision 1.1326
diff -u -b -r1.1325 -r1.1326
--- xdisp.c     5 Dec 2009 13:32:18 -0000       1.1325
+++ xdisp.c     5 Dec 2009 22:49:01 -0000       1.1326
@@ -16384,22 +16384,20 @@
 
 
 /* Push the display property PROP so that it will be rendered at the
-   current position in IT.  */
+   current position in IT.  Return 1 if PROP was successfully pushed,
+   0 otherwise.  */
 
-static void
+static int
 push_display_prop (struct it *it, Lisp_Object prop)
 {
   push_it (it);
 
-  /* Never display a cursor on the prefix.  */
-  it->avoid_cursor_p = 1;
-
   if (STRINGP (prop))
     {
       if (SCHARS (prop) == 0)
        {
          pop_it (it);
-         return;
+         return 0;
        }
 
       it->string = prop;
@@ -16426,8 +16424,10 @@
   else
     {
       pop_it (it);             /* bogus display property, give up */
-      return;
+      return 0;
     }
+
+  return 1;
 }
 
 /* Return the character-property PROP at the current position in IT.  */
@@ -16467,13 +16467,13 @@
       if (NILP (prefix))
        prefix = Vline_prefix;
     }
-  if (! NILP (prefix))
+  if (! NILP (prefix) && push_display_prop (it, prefix))
     {
-      push_display_prop (it, prefix);
       /* If the prefix is wider than the window, and we try to wrap
         it, it would acquire its own wrap prefix, and so on till the
         iterator stack overflows.  So, don't wrap the prefix.  */
       it->line_wrap = TRUNCATE;
+      it->avoid_cursor_p = 1;
     }
 }
 




reply via email to

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