From e9d4afecf512b4b7317b5cae93348c1346bf02d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A4mppi=20L=C3=BCtti?= Date: Sat, 22 Oct 2022 07:58:46 +0300 Subject: [PATCH] Fix vtable edges recognizing * Fix `vtable-beginning-of-table' returns point-min, if point is on table or on one position before. * Fix `vtable-end-of-table' returns point-max, if point is on table. --- 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 de8503a1cb..20f88ed33a 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.38.1