emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/rt-liberation 2bbaa76 06/15: * rt-liberation.el: last c


From: Yoni Rabkin
Subject: [elpa] externals/rt-liberation 2bbaa76 06/15: * rt-liberation.el: last communcation instead of section
Date: Wed, 17 Feb 2021 12:52:31 -0500 (EST)

branch: externals/rt-liberation
commit 2bbaa7641fbafdc07bea5d965d75cc2d2f831235
Author: Yoni Rabkin <yoni@rabkins.net>
Commit: Yoni Rabkin <yoni@rabkins.net>

    * rt-liberation.el: last communcation instead of section
    
    Make "N" jump to the last Comment, Create, or Correspond section,
    instead of just the last section.
---
 rt-liberation.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/rt-liberation.el b/rt-liberation.el
index 913bbeb..4ea72d1 100644
--- a/rt-liberation.el
+++ b/rt-liberation.el
@@ -246,6 +246,9 @@ This variable is made buffer local for the ticket history")
 (defvar rt-liber-viewer2-section-regexp "^Ticket [0-9]+ by "
   "Regular expression to match a section in the viewer.")
 
+(defvar rt-liber-viewer2-communicate-regexp (regexp-opt '("[Create]" 
"[Correspond]" "[Comment]"))
+  "Regular expression to match ticket communication.")
+
 (defvar rt-liber-viewer2-recenter 4
   "Argument passed to `recenter' in the viewer.")
 
@@ -1535,14 +1538,14 @@ ASSOC-BROWSER if non-nil should be a ticket browser."
           (recenter rt-liber-viewer2-recenter)))
     (goto-char (point-at-bol))))
 
-(defun rt-liber-viewer2-last-section-in ()
+(defun rt-liber-viewer2-last-communicate-in ()
   (interactive)
   (goto-char (point-max))
-  (let ((last (re-search-backward rt-liber-viewer2-section-regexp
+  (let ((last (re-search-backward rt-liber-viewer2-communicate-regexp
                                  (point-min)
                                  t)))
     (if (not last)
-       (error "no sections found")
+       (error "no communcations found")
       (recenter rt-liber-viewer2-recenter)
       (goto-char (point-at-bol)))))
 
@@ -1586,7 +1589,7 @@ ASSOC-BROWSER if non-nil should be a ticket browser."
 (defconst rt-liber-viewer2-mode-map
   (let ((map (make-sparse-keymap)))
     (define-key map (kbd "q") 'rt-liber-viewer2-mode-quit)
-    (define-key map (kbd "N") 'rt-liber-viewer2-last-section-in)
+    (define-key map (kbd "N") 'rt-liber-viewer2-last-communicate-in)
     (define-key map (kbd "n") 'rt-liber-viewer2-next-section-in)
     (define-key map (kbd "p") 'rt-liber-viewer2-previous-section-in)
     (define-key map (kbd "V") 'rt-liber-viewer-visit-in-browser)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]