summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoni Rabkin <yoni@rabkins.net>2021-03-27 16:04:45 -0400
committerYoni Rabkin <yoni@rabkins.net>2021-03-27 16:04:45 -0400
commitac02bc9d463da1ac3028b3ade5d4c89bd7d1204d (patch)
treeee0b8d9a4b2cb8e4bd9ced645a7bb27db03d849a
parentcfc0a7c4a3a022256c8088521e9c577486a1a8ad (diff)
* rt-liberation.el: start work on 2.4rc
-rw-r--r--NEWS6
-rw-r--r--rt-liberation.el80
2 files changed, 7 insertions, 79 deletions
diff --git a/NEWS b/NEWS
index 3d70407..bdd429c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+New in version 2.4
+
+ * Versions are now in X.Y format in order to be more elpa
+ friendly.
+
+
New in version 2.03
* Bug fix: incorrect display of certain dates in the viewer.
diff --git a/rt-liberation.el b/rt-liberation.el
index 63157ff..1140eed 100644
--- a/rt-liberation.el
+++ b/rt-liberation.el
@@ -5,7 +5,7 @@
;; Author: Yoni Rabkin <yrk@gnu.org>
;; Authors: Aaron S. Hawley <aaron.s.hawley@gmail.com>, John Sullivan <johnsu01@wjsullivan.net>
;; Maintainer: Yoni Rabkin <yrk@gnu.org>
-;; Version: 2.3
+;; Version: 2.4rc
;; Keywords: rt, tickets
;; Package-Type: multi
;; url: http://www.nongnu.org/rtliber/
@@ -375,12 +375,6 @@ If POINT is nil then called on (point)."
(let ((prev (previous-single-property-change (point) 'rt-ticket)))
(when prev (goto-char prev))))
-(defun rt-liber-display-ticket-at-point ()
- "Display the contents of the ticket at point."
- (interactive)
- (let ((ticket-alist (get-text-property (point) 'rt-ticket)))
- (rt-liber-display-ticket-history ticket-alist (current-buffer))))
-
(defun rt-liber-ticket-at-point ()
"Display the contents of the ticket at point."
(interactive)
@@ -728,45 +722,9 @@ returned as no associated text properties."
(rt-liber-browser-assign rt-liber-username))
-;;; --------------------------------------------------------
-;;; Viewer
-;;; --------------------------------------------------------
-(defun rt-liber-display-ticket-history (ticket-alist &optional assoc-browser)
- "Display history for ticket.
-TICKET-ALIST alist of ticket data.
-ASSOC-BROWSER if non-nil should be a ticket browser."
- (let* ((ticket-id (rt-liber-ticket-id-only ticket-alist))
- (contents (rt-liber-rest-run-ticket-history-base-query ticket-id))
- (new-ticket-buffer (get-buffer-create
- (concat "*RT Ticket #" ticket-id "*"))))
- (with-current-buffer new-ticket-buffer
- (let ((inhibit-read-only t))
- (erase-buffer)
- (insert contents)
- (goto-char (point-min))
- (rt-liber-viewer-mode)
- (set
- (make-local-variable 'rt-liber-ticket-local)
- ticket-alist)
- (when assoc-browser
- (set
- (make-local-variable 'rt-liber-assoc-browser)
- assoc-browser))
- (set-buffer-modified-p nil)
- (setq buffer-read-only t)))
- (switch-to-buffer new-ticket-buffer)))
-
-
;;; ------------------------------------------------------------------
;;; viewer mode functions
;;; ------------------------------------------------------------------
-(defun rt-liber-refresh-ticket-history (&optional _ignore-auto _noconfirm)
- (interactive)
- (if rt-liber-ticket-local
- (rt-liber-display-ticket-history rt-liber-ticket-local
- rt-liber-assoc-browser)
- (error "not viewing a ticket")))
-
(defun rt-liber-jump-to-latest-correspondence ()
"Move point to the newest correspondence section."
(interactive)
@@ -827,42 +785,6 @@ ASSOC-BROWSER if non-nil should be a ticket browser."
(message "no previous section"))
(goto-char (point-at-bol)))
-(defconst rt-liber-viewer-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map (kbd "q") 'rt-liber-viewer-mode-quit)
- (define-key map (kbd "n") 'rt-liber-next-section-in-viewer)
- (define-key map (kbd "N") 'rt-liber-jump-to-latest-correspondence)
- (define-key map (kbd "p") 'rt-liber-previous-section-in-viewer)
- (define-key map (kbd "V") 'rt-liber-viewer-visit-in-browser)
- (define-key map (kbd "m") 'rt-liber-viewer-answer)
- (define-key map (kbd "M") 'rt-liber-viewer-answer-this)
- (define-key map (kbd "t") 'rt-liber-viewer-answer-provisionally)
- (define-key map (kbd "T") 'rt-liber-viewer-answer-provisionally-this)
- (define-key map (kbd "F") 'rt-liber-viewer-answer-verbatim-this)
- (define-key map (kbd "c") 'rt-liber-viewer-comment)
- (define-key map (kbd "C") 'rt-liber-viewer-comment-this)
- (define-key map (kbd "g") 'revert-buffer)
- (define-key map (kbd "SPC") 'scroll-up)
- (define-key map (kbd "DEL") 'scroll-down)
- (define-key map (kbd "h") 'rt-liber-viewer-show-ticket-browser)
- map)
- "Key map for ticket viewer.")
-
-(define-derived-mode rt-liber-viewer-mode nil
- "RT Liberation Viewer"
- "Major Mode for viewing RT tickets.
-\\{rt-liber-viewer-mode-map}"
- (set
- (make-local-variable 'font-lock-defaults)
- '((rt-liber-viewer-font-lock-keywords)))
- (set (make-local-variable 'revert-buffer-function)
- #'rt-liber-refresh-ticket-history)
- (set (make-local-variable 'buffer-stale-function)
- (lambda (&optional _noconfirm) 'slow))
- (when rt-liber-jump-to-latest
- (rt-liber-jump-to-latest-correspondence))
- (run-hooks 'rt-liber-viewer-hook))
-
;; wrapper functions around specific functions provided by a backend
(declare-function
rt-liber-gnus-compose