From 96f48ebd97c19384f487c8a9c4cf474705ce1e37 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Tue, 24 Apr 2012 23:19:57 +0200 Subject: emacs.d/lisp/magit: version bump --- emacs.d/lisp/magit/contrib/magit | 87 +++++++++++++++++++++++ emacs.d/lisp/magit/contrib/magit-classic-theme.el | 57 +++++++++++++++ emacs.d/lisp/magit/contrib/magit-simple-keys.el | 52 ++++++++++++++ 3 files changed, 196 insertions(+) create mode 100755 emacs.d/lisp/magit/contrib/magit create mode 100644 emacs.d/lisp/magit/contrib/magit-classic-theme.el create mode 100644 emacs.d/lisp/magit/contrib/magit-simple-keys.el (limited to 'emacs.d/lisp/magit/contrib') diff --git a/emacs.d/lisp/magit/contrib/magit b/emacs.d/lisp/magit/contrib/magit new file mode 100755 index 0000000..5325571 --- /dev/null +++ b/emacs.d/lisp/magit/contrib/magit @@ -0,0 +1,87 @@ +#!/bin/sh + +# Copyright (C) 2011 Peter J Weisberg. +# +# Magit is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# Magit is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +# License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Magit. If not, see . +# ==================================================================== + +if test "$1" = "-h" || test "$1" = "--help"; then + cat <. + +;;; Commentary: + +;; This plug-in overrides the keybindings in magit-key-mode with +;; simpler keybindings; it does this by picking the most obviously +;; used command in each key group + +;;; Code: + +(require 'magit) + +(defvar magit-key-mode-mapping + '((logging magit-display-log) + (running magit-shell-command) + (fetching magit-fetch-current) + (pushing magit-push) + (pulling magit-pull) + (branching magit-checkout) + (tagging magit-tag) + (stashing magit-stash) + (merging magit-merge) + (submodule magit-submodule-update))) + +(defun magit-simple-keys-key-mode-generate (term mapping-function) + "Generate alias for the key-group term" + (eval + `(defalias ',(intern (concat "magit-key-mode-popup-" (symbol-name term))) + mapping-function))) + +;; generate the aliases using the mapping in key-mode-mapping +(mapc (lambda (g) + (magit-simple-keys-key-mode-generate (car g) (cadr g))) + magit-key-mode-mapping) + +(provide 'magit-simple-keys) +;;; magit-simple-keys.el ends here -- cgit v1.2.3