This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/contrib/!source-control/github/extensions.el
syl20bnr e923ae7fb7 github layer: Move magit-gh-pulls to extensions
For the transition period to magit 2.1
2015-06-30 22:47:52 -04:00

35 lines
1.2 KiB
EmacsLisp

;;; extensions.el --- Github Layer Extensions File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(setq github-post-extensions '(magit-gh-pulls))
(defun github/init-magit-gh-pulls ()
(use-package magit-gh-pulls
:commands magit-gh-pulls-mode
:init
(progn
(defun spacemacs/load-gh-pulls-mode ()
"Start `magit-gh-pulls-mode' only after a manual request."
(interactive)
(magit-gh-pulls-mode)
(magit-gh-pulls-reload))
(defun spacemacs/fetch-gh-pulls-mode ()
"Start `magit-gh-pulls-mode' only after a manual request."
(interactive)
(magit-gh-pulls-mode)
(magit-gh-pulls-fetch-commits))
(eval-after-load 'magit
'(progn
(define-key magit-mode-map "#gg" 'spacemacs/load-gh-pulls-mode)
(define-key magit-mode-map "#gf" 'spacemacs/fetch-gh-pulls-mode))))
:config
(spacemacs|diminish magit-gh-pulls-mode "Github-PR")))