From 89a260220c60877c0766cbe79043ecb4dd1fa5f4 Mon Sep 17 00:00:00 2001 From: Sean Allred Date: Thu, 27 Nov 2014 12:11:30 -0500 Subject: Fix #110 --- sx-question.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sx-question.el') diff --git a/sx-question.el b/sx-question.el index a7aadb2..01ba030 100644 --- a/sx-question.el +++ b/sx-question.el @@ -1,4 +1,4 @@ -;;; sx-question.el --- question logic for stack-mode -*- lexical-binding: t; -*- +;;; sx-question.el --- question logic ;; Copyright (C) 2014 Sean Allred @@ -167,4 +167,5 @@ If no cache exists for it, initialize one with SITE." ;; Local Variables: ;; indent-tabs-mode: nil +;; lexical-binding: t ;; End: -- cgit v1.2.3 From f26a55ce664d1840efef36079ab3634394006c5b Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Sat, 29 Nov 2014 00:00:28 +0000 Subject: Fix byte-compile warnings Fixes #115 --- sx-method.el | 3 ++- sx-question.el | 29 +++++++++++++++-------------- 2 files changed, 17 insertions(+), 15 deletions(-) (limited to 'sx-question.el') diff --git a/sx-method.el b/sx-method.el index 1b20cbf..83455b8 100644 --- a/sx-method.el +++ b/sx-method.el @@ -82,7 +82,8 @@ Return the entire response as a complex alist." (prog1 (format "?site=%s" site) (setq site nil))))) - (call #'sx-request-make)) + (call #'sx-request-make) + parameters) (lwarn "sx-call-method" :debug "A: %S T: %S. M: %S,%s. F: %S" (equal 'warn auth) access-token method-auth full-method filter-auth) (unless access-token diff --git a/sx-question.el b/sx-question.el index 01ba030..f80a9bd 100644 --- a/sx-question.el +++ b/sx-question.el @@ -134,20 +134,21 @@ If no cache exists for it, initialize one with SITE." (defun sx-question--mark-hidden (question) "Mark QUESTION as being hidden." - (let ((site-cell (assoc .site sx-question--user-hidden-list)) - cell) - ;; If question already hidden, do nothing. - (unless (memq .question_id site-cell) - ;; First question from this site. - (push (list .site .question_id) sx-question--user-hidden-list) - ;; Question wasn't present. - ;; Add it in, but make sure it's sorted (just in case we need - ;; it later). - (sx-sorted-insert-skip-first .question_id site-cell >) - ;; This causes a small lag on `j' and `k' as the list gets large. - ;; Should we do this on a timer? - ;; Save the results. - (sx-cache-set 'hidden-questions sx-question--user-hidden-list)))) + (sx-assoc-let question + (let ((site-cell (assoc .site sx-question--user-hidden-list)) + cell) + ;; If question already hidden, do nothing. + (unless (memq .question_id site-cell) + ;; First question from this site. + (push (list .site .question_id) sx-question--user-hidden-list) + ;; Question wasn't present. + ;; Add it in, but make sure it's sorted (just in case we need + ;; it later). + (sx-sorted-insert-skip-first .question_id site-cell >) + ;; This causes a small lag on `j' and `k' as the list gets large. + ;; Should we do this on a timer? + ;; Save the results. + (sx-cache-set 'hidden-questions sx-question--user-hidden-list))))) ;;;; Other data -- cgit v1.2.3