From e65c1790499bd6e5149529f8b84c46c6f4654b54 Mon Sep 17 00:00:00 2001 From: Yoni Rabkin Date: Sun, 22 Nov 2020 22:31:24 -0500 Subject: * rt-liberation-rest.el: clean up reorg --- rt-liberation-rest.el | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'rt-liberation-rest.el') diff --git a/rt-liberation-rest.el b/rt-liberation-rest.el index 249a090..3ad025d 100644 --- a/rt-liberation-rest.el +++ b/rt-liberation-rest.el @@ -28,12 +28,14 @@ ;; dependency on a local copy of the RT CLI. ;;; Code: - (require 'url) (require 'url-util) (require 'auth-source) +;;; ------------------------------------------------------------------ +;;; variables and constants +;;; ------------------------------------------------------------------ (defvar rt-liber-debug-log-enable nil "If t then enable logging of communication to a buffer. Careful! This might create a sizable buffer.") @@ -63,16 +65,9 @@ Careful! This might create a sizable buffer.") "If non-nil, be verbose about what's happening.") -(defun rt-liber-rest-write-debug (str) - "Write to debug buffer." - (when (not (stringp str)) - (error "argument not string")) - (when rt-liber-rest-debug-p - (with-current-buffer - (get-buffer-create rt-liber-rest-debug-buffer-name) - (goto-char (point-max)) - (insert str)))) - +;;; ------------------------------------------------------------------ +;;; functions +;;; ------------------------------------------------------------------ (defun rt-liber-rest-auth () "Try to get the REST credentials." (if (and (stringp rt-liber-rest-username) @@ -322,10 +317,10 @@ Careful! This might create a sizable buffer.") (rt-liber-rest-edit-runner id field status) 'rt-liber-command-runner-parser-f)) + ;;; -------------------------------------------------------- ;;; Debug log ;;; -------------------------------------------------------- - (defun rt-liber-debug-log-write (str) "Write STR to debug log." (when (not (stringp str)) @@ -335,6 +330,16 @@ Careful! This might create a sizable buffer.") (goto-char (point-max)) (insert str))) +(defun rt-liber-rest-write-debug (str) + "Write to debug buffer." + (when (not (stringp str)) + (error "argument not string")) + (when rt-liber-rest-debug-p + (with-current-buffer + (get-buffer-create rt-liber-rest-debug-buffer-name) + (goto-char (point-max)) + (insert str)))) + (provide 'rt-liberation-rest) -- cgit v1.2.3