]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert "Speed up find_field when called from outside a field"
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 21 Dec 2021 04:25:50 +0000 (05:25 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 21 Dec 2021 04:25:50 +0000 (05:25 +0100)
This reverts commit 4d8af56c76ee20bc8e1ebdeef5c4100cea005974.

This leads to lisp-mode-tests failures

src/editfns.c

index 355a7a3e299833edc338d2e87f4e91be13c17939..5c9c34dc3522dd6be8fc80f49d37f578a7534289 100644 (file)
@@ -437,27 +437,6 @@ find_field (Lisp_Object pos, Lisp_Object merge_at_boundary,
 
   after_field
     = get_char_property_and_overlay (pos, Qfield, Qnil, NULL);
-
-  /* We're not in a field, so find the prev/next area with a field
-     property.  */
-  if (NILP (after_field))
-    {
-      if (beg)
-       {
-         Lisp_Object p = Fprevious_single_char_property_change (pos, Qfield,
-                                                                Qnil,
-                                                                beg_limit);
-         *beg = NILP (p) ? BEGV : XFIXNAT (p);
-       }
-      if (end)
-       {
-         Lisp_Object p = Fnext_single_char_property_change (pos, Qfield, Qnil,
-                                                            end_limit);
-         *end = NILP (p) ? ZV : XFIXNAT (p);
-       }
-      return;
-    }
-
   before_field
     = (XFIXNAT (pos) > BEGV
        ? get_char_property_and_overlay (make_fixnum (XFIXNUM (pos) - 1),