]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix detection of vtable start and end
authorLämppi Lütti <lamppilutti@protonmail.com>
Sat, 22 Oct 2022 04:58:46 +0000 (07:58 +0300)
committerStefan Kangas <stefankangas@gmail.com>
Thu, 7 Sep 2023 20:23:24 +0000 (22:23 +0200)
* lisp/emacs-lisp/vtable.el (vtable-beginning-of-table)
(vtable-end-of-table): Fix detection of vtable limits.  (Bug#58712)

Copyright-paperwork-exempt: yes

lisp/emacs-lisp/vtable.el

index 0551053df8e44f40e4946675d629ee978045386b..61670ea69caa56949ffd9b80d3aa1ddf04015113 100644 (file)
@@ -240,13 +240,14 @@ See info node `(vtable)Top' for vtable documentation."
 
 (defun vtable-beginning-of-table ()
   "Go to the start of the current table."
-  (if (text-property-search-backward 'vtable (vtable-current-table))
+  (if (or (text-property-search-backward 'vtable (vtable-current-table) #'eq)
+          (get-text-property (point) 'vtable))
       (point)
     (goto-char (point-min))))
 
 (defun vtable-end-of-table ()
   "Go to the end of the current table."
-  (if (text-property-search-forward 'vtable (vtable-current-table))
+  (if (text-property-search-forward 'vtable (vtable-current-table) #'eq)
       (point)
     (goto-char (point-max))))