doomemacs/modules/tools/gist/autoload/gist.el

17 lines
489 B
EmacsLisp
Raw Normal View History

;;; tools/gist/autoload/gist.el -*- lexical-binding: t; -*-
2017-05-07 21:10:46 +08:00
;;;###autoload
(defun +gist/open-current ()
(interactive)
(gist-fetch-current)
(when-let* ((win (get-buffer-window "*github:gists*")))
2017-05-10 11:28:50 +08:00
(doom/popup-close win)))
2017-05-07 21:10:46 +08:00
;;;###autoload
(defun +gist/kill-cache ()
2017-05-10 11:28:50 +08:00
"Clears the gist cache. Necessary when a faulty cache causes gist.el to be
entirely unuseable."
2017-05-07 21:10:46 +08:00
(interactive)
(delete-directory (expand-file-name "gh" pcache-directory) t)
(message "gist.el cache cleared"))