aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Leech-Pepin <jonathan.leechpepin@gmail.com>2014-11-18 07:18:52 -0500
committerJonathan Leech-Pepin <jonathan.leechpepin@gmail.com>2014-11-18 07:18:52 -0500
commit6a7e345bb776c715c0801674ff4cc5feaef08f4c (patch)
treef02b8d6e5fad90db6dd7d4ed3a325f73bca05f8a
parent49ccfdc2202cb8d71638e115509fc20d487a0da1 (diff)
Refactor sx-network--get-associated to avoid double call to
sx-cache-set. Fix provides lines (missed quote on symbol).
-rw-r--r--sx-favorites.el2
-rw-r--r--sx-networks.el8
2 files changed, 5 insertions, 5 deletions
diff --git a/sx-favorites.el b/sx-favorites.el
index b66b2c5..0b9527a 100644
--- a/sx-favorites.el
+++ b/sx-favorites.el
@@ -79,7 +79,7 @@ Writes list to cache QUESTION-FAVORITES."
(mapc #'sx-favorites--update-site-favorites
sx-network--user-sites))
-(provide sx-favorites)
+(provide 'sx-favorites)
;;; sx-favorites.el ends here
;; Local Variables:
diff --git a/sx-networks.el b/sx-networks.el
index 3a33f1a..2be764f 100644
--- a/sx-networks.el
+++ b/sx-networks.el
@@ -53,9 +53,9 @@
none))
(defun sx-network--get-associated ()
- (sx-cache-get
- 'network-user
- '(sx-network--update)))
+ (or (sx-cache-get
+ 'network-user)
+ (sx-network--update))
(defun sx-network--update ()
"Update user information."
@@ -102,7 +102,7 @@ list of sites the user is active on."
(defvar sx-network--user-sites nil
"List of sites where user already has an account.")
-(provide sx-networks)
+(provide 'sx-networks)
;;; sx-networks.el ends here
;; Local Variables: