From e9ec3a032649db96b7e76b7d10f1581d17d91b78 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Thu, 12 Aug 2021 11:06:40 +1000 Subject: renaming rt-liber-viewer-move-point-to-section --- rt-liberation-org.el | 2 +- rt-liberation.el | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/rt-liberation-org.el b/rt-liberation-org.el index a682ed4..56bd44e 100644 --- a/rt-liberation-org.el +++ b/rt-liberation-org.el @@ -38,7 +38,7 @@ (rt-liber-browser-move-point-to-ticket id) (rt-liber-ticket-at-point) (when history-id - (rt-liber-viewer-move-point-to-section history-id)))) + (rt-liber-viewer2-move-point-to-section history-id)))) ((string-match "^query:\\(.+\\)" link) (rt-liber-browse-query (match-string 1 link))) (t (error "Unrecognized link type '%s'" link)))) diff --git a/rt-liberation.el b/rt-liberation.el index 51efc69..a50dcbb 100644 --- a/rt-liberation.el +++ b/rt-liberation.el @@ -785,18 +785,6 @@ returned as no associated text properties." (message "no previous section")) (goto-char (point-at-bol))) -(defun rt-liber-viewer-move-point-to-section (history-id) - "Move point to the beginning of section with HISTORY-ID." - (let ((current-history-id (alist-get 'id (rt-liber-viewer2-get-section-data))) - (previous-history-id nil)) - (while (not (or (string-equal history-id current-history-id) - (eq current-history-id previous-history-id))) - (setq previous-history-id current-history-id) - (rt-liber-viewer2-next-section-in) - (setq current-history-id (alist-get 'id (rt-liber-viewer2-get-section-data)))) - (when (not (string-equal history-id current-history-id)) - (error "Cannot find section.")))) - ;; wrapper functions around specific functions provided by a backend (declare-function rt-liber-gnus-compose @@ -1208,6 +1196,18 @@ ASSOC-BROWSER if non-nil should be a ticket browser." (recenter rt-liber-viewer2-recenter))) (goto-char (point-at-bol)))) +(defun rt-liber-viewer2-move-point-to-section (history-id) + "Move point to the beginning of section with HISTORY-ID." + (let ((current-history-id (alist-get 'id (rt-liber-viewer2-get-section-data))) + (previous-history-id nil)) + (while (not (or (string-equal history-id current-history-id) + (eq current-history-id previous-history-id))) + (setq previous-history-id current-history-id) + (rt-liber-viewer2-next-section-in) + (setq current-history-id (alist-get 'id (rt-liber-viewer2-get-section-data)))) + (when (not (string-equal history-id current-history-id)) + (error "Cannot find section.")))) + (defun rt-liber-viewer2-answer () (interactive) (let ((section (rt-liber-viewer2-get-section-data))) -- cgit v1.2.3