From 203ec6a369bdd96e1114b65f6ae532d4de9bb338 Mon Sep 17 00:00:00 2001 From: Yoni Rabkin Date: Mon, 3 Aug 2020 22:05:14 -0400 Subject: * rt-liberation-gnus.el: avoid compiler warning Macros need to be defined before functions. --- rt-liberation-gnus.el | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/rt-liberation-gnus.el b/rt-liberation-gnus.el index 3622a82..012ad24 100644 --- a/rt-liberation-gnus.el +++ b/rt-liberation-gnus.el @@ -21,12 +21,21 @@ ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ;; MA 02111-1307, USA. + ;;; Installation: ;; ;; For installation instructions and detailed help please see the ;; wonderful rt-liberation manual located in the "doc/" directory of ;; the rt-liberation distribution. + +;; Code: + +(require 'rt-liberation) +(require 'nnir) +(require 'gnus-msg) + + (defgroup rt-liber-gnus nil "*Gnus integration for rt-liberation." :prefix "rt-liber-gnus-" @@ -65,15 +74,17 @@ line of an email. For example: \\[company.com #\\([0-9].+?\\)\\]" :type 'string :group 'rt-liber-gnus) -(require 'rt-liberation) -(require 'nnir) -(require 'gnus-msg) - - (defvar rt-liber-gnus-p nil "Non-nil when rt-liberation-gnus is composing a Gnus buffer.") +(defmacro rt-liber-gnus-with-ticket-buffer (&rest body) + `(progn + (when (not (boundp 'rt-liber-ticket-local)) + (error "rt-liberation ticket view buffer not present")) + ,@body)) + + (defun rt-liber-gnus-compose (addr ticket-alist options) "Create a Gnus *mail* buffer for the RT email interface. ADDR email address. @@ -143,12 +154,6 @@ OPTIONS association list of options. (setq text (buffer-substring (point-min) (point-max)))) text)))) -(defmacro rt-liber-gnus-with-ticket-buffer (&rest body) - `(progn - (when (not (boundp 'rt-liber-ticket-local)) - (error "rt-liberation ticket view buffer not present")) - ,@body)) - (defun rt-liber-gnus-compose-reply-to-requestor () (interactive) (rt-liber-gnus-with-ticket-buffer -- cgit v1.2.3