diff options
Diffstat (limited to 'rt-liberation-rest.el')
-rw-r--r-- | rt-liberation-rest.el | 29 |
1 files changed, 17 insertions, 12 deletions
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) |