diff src/marker.c @ 380:8626e4521993 r21-2-5

Import from CVS: tag r21-2-5
author cvs
date Mon, 13 Aug 2007 11:07:10 +0200
parents 6240c7796c7a
children 74fd4e045ea6
line wrap: on
line diff
--- a/src/marker.c	Mon Aug 13 11:06:08 2007 +0200
+++ b/src/marker.c	Mon Aug 13 11:07:10 2007 +0200
@@ -75,16 +75,15 @@
 }
 
 static int
-marker_equal (Lisp_Object o1, Lisp_Object o2, int depth)
+marker_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 {
-  struct buffer *b1 = XMARKER (o1)->buffer;
-  if (b1 != XMARKER (o2)->buffer)
-    return (0);
-  else if (!b1)
-    /* All markers pointing nowhere are equal */
-    return (1);
-  else
-    return ((XMARKER (o1)->memind == XMARKER (o2)->memind));
+  struct Lisp_Marker *marker1 = XMARKER (obj1);
+  struct Lisp_Marker *marker2 = XMARKER (obj2);
+
+  return ((marker1->buffer == marker2->buffer) &&
+	  (marker1->memind == marker2->memind ||
+	  /* All markers pointing nowhere are equal */
+	   !marker1->buffer));
 }
 
 static unsigned long
@@ -180,7 +179,7 @@
       (MARKERP (pos) && !XMARKER (pos)->buffer))
     {
       if (point_p)
-	signal_simple_error ("can't make point-marker point nowhere",
+	signal_simple_error ("Can't make point-marker point nowhere",
 			     marker);
       if (XMARKER (marker)->buffer)
 	unchain_marker (marker);
@@ -199,7 +198,7 @@
 	{
 	  if (point_p)
 	    signal_simple_error
-	      ("can't move point-marker in a killed buffer", marker);
+	      ("Can't move point-marker in a killed buffer", marker);
 	  if (XMARKER (marker)->buffer)
 	    unchain_marker (marker);
 	  return marker;
@@ -237,7 +236,7 @@
   if (m->buffer != b)
     {
       if (point_p)
-	signal_simple_error ("can't change buffer of point-marker", marker);
+	signal_simple_error ("Can't change buffer of point-marker", marker);
       if (m->buffer != 0)
 	unchain_marker (marker);
       m->buffer = b;