]> code.delx.au - gnu-emacs/blobdiff - src/intervals.c
*** empty log message ***
[gnu-emacs] / src / intervals.c
index d3f814d60cecbe0faa32983dce147fed78219603..a822dafefcf801c890f069f14863f206b5682e5d 100644 (file)
@@ -1899,11 +1899,13 @@ lookup_char_property (plist, prop, textprop)
     return fallback;
   /* Check for alternative properties */
   tail = Fassq (prop, Vchar_property_alias_alist);
-  if (NILP (tail))
-    return tail;
-  tail = XCDR (tail);
-  for (; NILP (fallback) && CONSP (tail); tail = XCDR (tail))
-    fallback = Fplist_get (plist, XCAR (tail));
+  if (! NILP (tail))
+    {
+      tail = XCDR (tail);
+      for (; NILP (fallback) && CONSP (tail); tail = XCDR (tail))
+       fallback = Fplist_get (plist, XCAR (tail));
+    }
+
   if (textprop && NILP (fallback) && CONSP (Vdefault_text_properties))
     fallback = Fplist_get (Vdefault_text_properties, prop);
   return fallback;
@@ -2273,6 +2275,10 @@ move_if_not_intangible (position)
          pos = Fnext_char_property_change (pos, Qnil);
 
     }
+  else if (position < BEGV)
+    position = BEGV;
+  else if (position > ZV)
+    position = ZV;
 
   /* If the whole stretch between PT and POSITION isn't intangible,
      try moving to POSITION (which means we actually move farther