aboutsummaryrefslogtreecommitdiff
path: root/sx-interaction.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-01-07 20:30:34 -0200
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-01-07 20:30:34 -0200
commitae3e8ee9d9f792ff8c543c249f6d26fb22ec7965 (patch)
tree8d9364d4bee09fc181e9fdfc3ab3f6ad0b8e5db7 /sx-interaction.el
parent78c576bb9f784f1c063399f8c97b5f163f586497 (diff)
Rename add to ensure
Diffstat (limited to 'sx-interaction.el')
-rw-r--r--sx-interaction.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/sx-interaction.el b/sx-interaction.el
index 6ecfa38..8b72ea5 100644
--- a/sx-interaction.el
+++ b/sx-interaction.el
@@ -291,7 +291,7 @@ TEXT is a string. Interactively, it is read from the minibufer."
;; The api returns the new DATA.
(when (> (length result) 0)
(sx--add-comment-to-object
- (sx--add-owner-to-object (list (cons 'display_name "(You)")) (elt result 0))
+ (sx--ensure-owner-in-object (list (cons 'display_name "(You)")) (elt result 0))
(if .post_id (sx--get-post .post_type .site_par .post_id) data))
;; Display the changes in `data'.
(sx--maybe-update-display)))))
@@ -345,7 +345,7 @@ OBJECT can be a question or an answer."
(setcar object `(comments . [,comment]))))
object)
-(defun sx--add-owner-to-object (owner object)
+(defun sx--ensure-owner-in-object (owner object)
"Add `owner' property with value OWNER to OBJECT."
(unless (cdr-safe (assq 'owner object))
(setcdr object (cons (car object) (cdr object)))