This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// {{{ Information | |
let INFO = xml` | |
<plugin name="buftabs" version="1.0" | |
href="" | |
summary="Buftabs: show the tabbar in the statusline" | |
xmlns="http://vimperator.org/namespaces/liberator"> | |
<author email="[email protected]">s2marine</author> | |
<license href="">GPLv3</license> | |
<p> | |
This is a fork from Lucas de Vries's buftabs (https://github.com/GGLucas/vimperator-buftabs). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Protect against accidental pushes to certain branches, eval it after magit initializes. | |
(with-eval-after-load 'magit | |
(defadvice magit-git-push | |
(around my-protect-accidental-magit-git-push) | |
"Ask the user for confirmation before pushing to certain branches." | |
(if (member (ad-get-arg 0) '("develop" "master")) | |
(if (yes-or-no-p (format "Push branch %s to %s?" (ad-get-arg 0) (ad-get-arg 1))) | |
ad-do-it | |
(error "Push aborted by user")) | |
ad-do-it)) |