diff options
| author | Yoni Rabkin <yoni@rabkins.net> | 2022-01-13 11:36:38 -0500 |
|---|---|---|
| committer | Yoni Rabkin <yoni@rabkins.net> | 2022-01-13 11:36:38 -0500 |
| commit | 7cedc65bff8d65cde0c6a5b2c630c712c52ed26e (patch) | |
| tree | 6fccaf9dc151f43da743fbea798be6e22bdc30d1 | |
| parent | 884f16de31451701c513e6b3d6321e56185d4e6c (diff) | |
* rt-liberation.el: more gnus intergration cleanup
| -rw-r--r-- | rt-liberation-gnus.el | 37 | ||||
| -rw-r--r-- | rt-liberation.el | 33 |
2 files changed, 27 insertions, 43 deletions
diff --git a/rt-liberation-gnus.el b/rt-liberation-gnus.el index 802d1fb..521917a 100644 --- a/rt-liberation-gnus.el +++ b/rt-liberation-gnus.el @@ -127,8 +127,8 @@ OPTIONS association list of options. (defun rt-liber-gnus-compose-answer (ticket-alist options) (rt-liber-gnus-compose rt-liber-gnus-address ticket-alist options)) -;; (defun rt-liber-gnus-compose-comment (ticket-alist options) -;; (rt-liber-gnus-compose rt-liber-gnus-comment-address ticket-alist options)) +(defun rt-liber-gnus-compose-comment (ticket-alist options) + (rt-liber-gnus-compose rt-liber-gnus-comment-address ticket-alist options)) (defmacro rt-liber-gnus-with-ticket-buffer (&rest body) `(progn @@ -216,16 +216,6 @@ OPTIONS association list of options. rt-liber-gnus-delayed-response-text nil)))))) -(defun rt-liber-gnus-compose-comment () - (interactive) - (rt-liber-gnus-with-ticket-buffer - (rt-liber-gnus-compose - rt-liber-gnus-comment-address - rt-liber-ticket-local - `((suppress-subject . t) - (no-comment . t) - )))) - (defun rt-liber-gnus-compose-comment-this () (interactive) (rt-liber-gnus-with-ticket-buffer @@ -249,6 +239,29 @@ OPTIONS association list of options. (rt-liber-compile-query (id match))))) +(defun rt-liber-gnus-viewer-answer () + (interactive) + (let ((section (rt-liber-viewer-get-section-data))) + (when (not section) + (error "no section found")) + (if (not (featurep 'rt-liberation-gnus)) + (error "rt-liberation-gnus feature not found") + (rt-liber-gnus-compose-answer + rt-liber-ticket-local + `((contents . ,(rt-liber-viewer-clean-content section))))))) + +(defun rt-liber-gnus-viewer-comment () + (interactive) + (let ((section (rt-liber-viewer-get-section-data))) + (when (not section) + (error "no section found")) + (if (not (featurep 'rt-liberation-gnus)) + (error "rt-liberation-gnus feature not found") + (rt-liber-gnus-compose-comment + rt-liber-ticket-local + `((contents . ,(rt-liber-viewer-clean-content section))))))) + + (provide 'rt-liberation-gnus) ;;; rt-liberation-gnus.el ends here. diff --git a/rt-liberation.el b/rt-liberation.el index 898ae7c..fe73aa6 100644 --- a/rt-liberation.el +++ b/rt-liberation.el @@ -50,14 +50,6 @@ (declare-function rt-liber-get-ancillary-text "rt-liberation-storage.el") (declare-function rt-liber-ticket-marked-p "rt-liberation-multi.el") (declare-function rt-liber-set-ancillary-text "rt-liberation-storage.el") -;; (declare-function rt-liber-gnus-compose "rt-liberation-gnus.el") -;; (declare-function rt-liber-gnus-compose-reply-to-requestor "rt-liberation-gnus.el") -;; (declare-function rt-liber-gnus-compose-reply-to-requestor-to-this "rt-liberation-gnus.el") -;; (declare-function rt-liber-gnus-compose-reply-to-requestor-verbatim-this "rt-liberation-gnus.el") -;; (declare-function rt-liber-gnus-compose-provisional "rt-liberation-gnus.el") -;; (declare-function rt-liber-gnus-compose-provisional-to-this "rt-liberation-gnus.el") -;; (declare-function rt-liber-gnus-compose-comment "rt-liberation-gnus.el") -;; (declare-function rt-liber-gnus-compose-comment-this "rt-liberation-gnus.el") (defgroup rt-liber nil @@ -1084,27 +1076,6 @@ ASSOC-BROWSER if non-nil should be a ticket browser." (recenter rt-liber-viewer-recenter))) (goto-char (point-at-bol)))) -(defun rt-liber-viewer-answer () - (interactive) - (let ((section (rt-liber-viewer-get-section-data))) - (when (not section) - (error "no section found")) - (if (not (featurep 'rt-liberation-gnus)) - (error "rt-liberation-gnus feature not found") - (rt-liber-gnus-compose-answer - rt-liber-ticket-local - `((contents . ,(rt-liber-viewer-clean-content section))))))) - -(defun rt-liber-viewer-comment () - (interactive) - (let ((section (rt-liber-viewer-get-section-data))) - (when (not section) - (error "no section found")) - (if (not (featurep 'rt-liberation-gnus)) - (error "rt-liberation-gnus feature not found") - (rt-liber-gnus-compose-comment - rt-liber-ticket-local - `((contents . ,(rt-liber-viewer-clean-content section))))))) (defconst rt-liber-viewer-mode-map (let ((map (make-sparse-keymap))) @@ -1113,8 +1084,8 @@ ASSOC-BROWSER if non-nil should be a ticket browser." (define-key map (kbd "n") 'rt-liber-viewer-next-section-in) (define-key map (kbd "p") 'rt-liber-viewer-previous-section-in) (define-key map (kbd "V") 'rt-liber-viewer-visit-in-browser) - (define-key map (kbd "M") 'rt-liber-viewer-answer) - (define-key map (kbd "C") 'rt-liber-viewer-comment) + (define-key map (kbd "M") 'rt-liber-gnus-viewer-answer) + (define-key map (kbd "C") 'rt-liber-gnus-viewer-comment) (define-key map (kbd "g") 'revert-buffer) (define-key map (kbd "SPC") 'scroll-up) (define-key map (kbd "DEL") 'scroll-down) |
