doomemacs/modules/tools/gist/config.el

17 lines
578 B
EmacsLisp
Raw Normal View History

;;; tools/gist/config.el -*- lexical-binding: t; -*-
2017-05-07 21:10:46 +08:00
;; NOTE On occasion, the cache gets corrupted, causing wrong-type-argument
;; errors. If that happens, try `+gist/kill-cache'. You may have to restart
;; Emacs.
(def-package! gist
:commands (gist-list gist-region-or-buffer-private gist-region-or-buffer)
:config
(set! :evil-state 'gist-list-mode 'normal)
(defun +gist*list-render (orig-fn &rest args)
(funcall orig-fn (car args) t)
(unless (cadr args)
(pop-to-buffer (current-buffer))))
(advice-add #'gist-list-render :around #'+gist*list-render))