doomemacs/modules/tools/gist/config.el
Henrik Lissner 3310f9dfe2
tools/gist: open gists in non-popups
- Removes +gist/kill-cache (gist-list and gist-list-user with a
  universal argument already does this).
- Removes +gist/open-current. No longer necessary when gists aren't
  opened in popups.
- Makes keybinds more consistent with other "porcelains", like elfeed's
  or magit.
2019-04-02 15:47:09 -04:00

16 lines
536 B
EmacsLisp

;;; tools/gist/config.el -*- lexical-binding: t; -*-
;; 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.
(after! gist
(set-evil-initial-state! 'gist-list-mode 'normal)
(set-popup-rule! "^\\*gist-" :ignore t)
(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))