diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2014-12-02 02:18:25 +0000 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2014-12-02 02:18:25 +0000 |
commit | f800936f58d13d8de97eab4b57d3965256482e38 (patch) | |
tree | 982d245f67fc2a80408a7dde8e6ac4658534c2f5 | |
parent | 89a45e4724089a8bfdecaa6f58ae5394c10d85e3 (diff) |
Refactor sx-compose-create
-rw-r--r-- | sx-compose.el | 8 | ||||
-rw-r--r-- | sx-interaction.el | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sx-compose.el b/sx-compose.el index 0ae1f93..273e02d 100644 --- a/sx-compose.el +++ b/sx-compose.el @@ -67,7 +67,7 @@ Is invoked between `sx-compose-before-send-hook' and 0 42 (read-only t rear-nonsticky t intangible t sx-compose-separator t))) "Headers inserted when composing a new question. -Used by `sx-compose--create'.") +Used by `sx-compose-create'.") ;;; Major-mode @@ -79,7 +79,7 @@ API. This mode won't function if `sx-compose--send-function' isn't set. To make sure you set it correctly, you can create the buffer -with the `sx-compose--create' function. +with the `sx-compose-create' function. \\<sx-compose-mode> \\{sx-compose-mode}" @@ -117,8 +117,8 @@ contents to the API, then calls `sx-compose-after-send-functions'." ;;; Functions to help preparing buffers -(defun sx-compose--create (site parent &optional before-functions after-functions) - "Create a `sx-compose-mode' buffer. +(defun sx-compose-create (site parent &optional before-functions after-functions) + "Create an `sx-compose-mode' buffer. SITE is the site where it will be posted. If composing questions, PARENT is nil. diff --git a/sx-interaction.el b/sx-interaction.el index ce00889..85d681c 100644 --- a/sx-interaction.el +++ b/sx-interaction.el @@ -216,7 +216,7 @@ from context at point." (when .comment_id (user-error "Editing comments is not supported yet")) (let ((buffer (current-buffer))) (pop-to-buffer - (sx-compose--create + (sx-compose-create .site data nil ;; After send functions (list (lambda (_ res) @@ -233,7 +233,7 @@ SITE is a string, indicating where the question will be posted." (interactive (list (sx-tab--interactive-site-prompt))) (let ((buffer (current-buffer))) (pop-to-buffer - (sx-compose--create + (sx-compose-create site nil nil ;; After send functions (list (lambda (_ res) (sx--maybe-update-display buffer))))))) @@ -252,7 +252,7 @@ context at point. " (let ((buffer (current-buffer))) (sx-assoc-let data (pop-to-buffer - (sx-compose--create + (sx-compose-create .site .question_id nil ;; After send functions (list (lambda (_ res) |