aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-04-18 08:43:26 +0100
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-04-18 08:51:12 +0100
commit9656457f6c00441ffed8eb6b633080a0316a4a0f (patch)
treec8d0ee877ca9491adbfebe77036cccd8b45f9624
parent717d22d6709b9df12d6bfd38bc4b0475e34d50f1 (diff)
Generalize sx-method-post-from-data
-rw-r--r--sx-method.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/sx-method.el b/sx-method.el
index e458213..065f8d6 100644
--- a/sx-method.el
+++ b/sx-method.el
@@ -153,8 +153,8 @@ the following which are decided by this function:
:filter is `sx-browse-filter'.
:auth is warn.
-As a special exception, if KEYS is a single argument, it is
-assumed to be the :submethod argument."
+As a special exception, if the car of KEYS is not a keyword, it
+is assumed to be the :submethod argument."
(declare (indent 1))
(sx-assoc-let data
(apply #'sx-method-call
@@ -166,9 +166,9 @@ assumed to be the :submethod argument."
:url-method 'post
:filter sx-browse-filter
:site .site_par
- (if (= 1 (length keys))
- (cons :submethod keys)
- keys))))
+ (if (keywordp (car keys))
+ keys
+ (cons :submethod keys)))))
(provide 'sx-method)
;;; sx-method.el ends here