diff options
author | Yoni Rabkin <yoni@rabkins.net> | 2020-11-22 22:31:24 -0500 |
---|---|---|
committer | Yoni Rabkin <yoni@rabkins.net> | 2020-11-22 22:31:24 -0500 |
commit | e65c1790499bd6e5149529f8b84c46c6f4654b54 (patch) | |
tree | 42f2f6513178a30bfcdfb706e6003900e6ccb152 /rt-liberation-rest.el | |
parent | fdf3ccd3d176c17c447492ce5c4359304f1b38d7 (diff) |
* rt-liberation-rest.el: clean up reorg
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) |