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

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

[elpa] externals/rt-liberation 7cedc65bff: * rt-liberation.el: more gnus


From: ELPA Syncer
Subject: [elpa] externals/rt-liberation 7cedc65bff: * rt-liberation.el: more gnus intergration cleanup
Date: Thu, 13 Jan 2022 11:57:52 -0500 (EST)

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

    * rt-liberation.el: more gnus intergration cleanup
---
 rt-liberation-gnus.el | 37 +++++++++++++++++++++++++------------
 rt-liberation.el      | 33 ++-------------------------------
 2 files changed, 27 insertions(+), 43 deletions(-)

diff --git a/rt-liberation-gnus.el b/rt-liberation-gnus.el
index 802d1fbf4a..521917a235 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 898ae7c018..fe73aa62be 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)



reply via email to

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