From 55c2180d2c34007182edc06b159ca19bd1b584bf Mon Sep 17 00:00:00 2001 From: =?utf8?q?L=C3=A4mppi=20L=C3=BCtti?= Date: Sat, 22 Oct 2022 07:58:46 +0300 Subject: [PATCH] Fix detection of vtable start and end * 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/vtable.el b/lisp/emacs-lisp/vtable.el index 0551053df8e..61670ea69ca 100644 --- a/lisp/emacs-lisp/vtable.el +++ b/lisp/emacs-lisp/vtable.el @@ -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)))) -- 2.39.5