diff options
author | Sean Allred <code@seanallred.com> | 2014-11-02 11:49:49 -0500 |
---|---|---|
committer | Sean Allred <code@seanallred.com> | 2014-11-02 11:49:49 -0500 |
commit | 434b71bb59ceea9c6cf93fcf3b6450b31426a260 (patch) | |
tree | aa84bf07596674171f7b8f4b949a0736858621ae /stack-core.el | |
parent | d273e792fbc1cc7238e156e24099d25ed0b3c53e (diff) |
Convenience function for retrieving cache files
This should be sorted somewhere... Maybe stack-cache.el needs to be its
own file.
Diffstat (limited to 'stack-core.el')
-rw-r--r-- | stack-core.el | 6 |
1 files changed, 5 insertions, 1 deletions
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) |