From 434b71bb59ceea9c6cf93fcf3b6450b31426a260 Mon Sep 17 00:00:00 2001 From: Sean Allred Date: Sun, 2 Nov 2014 11:49:49 -0500 Subject: Convenience function for retrieving cache files This should be sorted somewhere... Maybe stack-cache.el needs to be its own file. --- stack-core.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'stack-core.el') diff --git a/stack-core.el b/stack-core.el index fde06a8..0d87f48 100644 --- a/stack-core.el +++ b/stack-core.el @@ -245,10 +245,14 @@ entire response as a complex alist." cons-cell)))) data)))) +(defun stack-cache-get-file-name (filename) + "Expands FILENAME in the context of `stack-cache-directory'." + (expand-file-name filename stack-cache-directory)) + (defun stack-cache-get-file (filename) "Return a buffer for FILENAME from `stack-cache-directory'." (let ((find-file-hook nil) - (file (expand-file-name filename stack-cache-directory))) + (file (stack-cache-get-file-name filename))) (unless (file-exists-p stack-cache-directory) (mkdir stack-cache-directory)) (unless (file-exists-p file) -- cgit v1.2.3