# HG changeset patch # User Augie Fackler # Date 1352760079 21600 # Node ID 228f11416f2865db8c387edcbdeda9fe5edc844c # Parent 276c14c5eec0a959bec377d7f0bb80cc1624e24b# Parent 142fb39e4e550ae3b25ec3e280499abe218c3e7c Merge diff --git a/.elisp/settings/00.bootstrap.el b/.elisp/settings/00.bootstrap.el --- a/.elisp/settings/00.bootstrap.el +++ b/.elisp/settings/00.bootstrap.el @@ -5,6 +5,7 @@ (package-initialize) (setq package-archives '(("durin42" . "http://durin42.com/elpa/") + ("marmalade" . "http://marmalade-repo.org/packages/") ("elpa" . "http://tromey.com/elpa/"))) (defun af-bootstrap-packages () diff --git a/.elisp/settings/50.localfuncs.el b/.elisp/settings/50.localfuncs.el --- a/.elisp/settings/50.localfuncs.el +++ b/.elisp/settings/50.localfuncs.el @@ -17,20 +17,26 @@ spends an eternity in a regex if you mak ad-do-it)) ;; Generic repository differ. Requires textmate.el and mercurial.el. +;; Will use monky or magit if either one is present. (defun af-generic-diff-repo () (interactive) (let ((root (textmate-project-root))) - (cd root) - (hg-view-output - ((format "project diff for %s" root)) - (call-process (textmate-project-root-type root) nil t nil "diff") - (diff-mode) - (setq diff (not (= (point-min) (point-max)))) - (font-lock-fontify-buffer) - (cd root)))) + (cond ((and (string= (textmate-project-root-type root) "hg") (fboundp 'monky-status)) (monky-status)) + ((and (string= (textmate-project-root-type root) "git") (fboundp 'magit-status)) (magit-status root)) + (t (progn + (cd root) + (hg-view-output + ((format "project diff for %s" root)) + (call-process (textmate-project-root-type root) nil t nil "diff") + (diff-mode) + (setq diff (not (= (point-min) (point-max)))) + (font-lock-fontify-buffer) + (cd root))))))) + (global-set-key [(control c)(t)(=)] 'af-generic-diff-repo) (global-set-key [(control c)(d)] 'af-generic-diff-repo) + (defun af-rotate-list (l) "Move the head of l to the end of the list." (append (cdr l) (list (car l)))) diff --git a/.elisp/settings/50.preferences.el b/.elisp/settings/50.preferences.el --- a/.elisp/settings/50.preferences.el +++ b/.elisp/settings/50.preferences.el @@ -72,7 +72,17 @@ (put 'narrow-to-region 'disabled nil) ;; whitespace detection -(setq whitespace-style '(trailing tabs lines-tail indentation trailing empty)) +(setq + whitespace-line-column 78 + whitespace-style '(face + trailing + space-after-tab + space-before-tab + lines-tail + indentation + empty + tabs) + ) (global-whitespace-mode 1) ;; Disable VC plumbing since I don't really use it that much anyway diff --git a/.elisp/settings/80.go.el b/.elisp/settings/80.go.el --- a/.elisp/settings/80.go.el +++ b/.elisp/settings/80.go.el @@ -2,7 +2,7 @@ (defun af-go-hook () ;; enable tabs (setq tab-width 2) - (setq-default indent-tabs-mode t) + (setq indent-tabs-mode t) (make-variable-buffer-local 'whitespace-style) (setq whitespace-style '(trailing lines-tail indentation trailing empty)) ) diff --git a/.elisp/settings/90.colors.el b/.elisp/settings/90.colors.el --- a/.elisp/settings/90.colors.el +++ b/.elisp/settings/90.colors.el @@ -4,7 +4,10 @@ (cursor-color . "white") (cursor-type . box) (foreground-color . "white") - (background-color . "black"))) + (background-color . "black") + (tool-bar-lines . 0) + ) + initial-frame-alist default-frame-alist) ;; tell ipython we have a dark background (setq py-python-command-args (quote ("-i"))) diff --git a/.gitconfig b/.gitconfig --- a/.gitconfig +++ b/.gitconfig @@ -6,3 +6,5 @@ [color] diff = auto status = auto +[alias] + glog = log --graph --all --format=format:'%h - (%ar) - %an %at %d%n%s%n' --abbrev-commit --date=iso diff --git a/.shell.d/50.vcs_functions.sh b/.shell.d/50.vcs_functions.sh --- a/.shell.d/50.vcs_functions.sh +++ b/.shell.d/50.vcs_functions.sh @@ -127,9 +127,14 @@ function vcs_current_branch() { fi hg branch 2> /dev/null > /dev/null if [ $? = 0 ] ; then + local bm=$(hg book | egrep ' \* ' | awk '{print $2}') local br=`hg branch | head -c 10` local rid=`hg parents --template '{node}\n' | head -n 1 | head -c 7` - echo "$br $rid" + if [ -z "$bm" ] ; then + echo "$br $rid" + else + echo "$bm $rid" + fi return 0 fi return 1 diff --git a/.zfun/_hg b/.zfun/_hg --- a/.zfun/_hg +++ b/.zfun/_hg @@ -886,6 +886,12 @@ typeset -A _hg_cmd_globals '*:patch:_hg_qapplied' } +_hg_cmd_qfinish() { + _arguments -s -w : $_hg_global_opts \ + '(--all -a)'{-a,--all}'[finish all patches]' \ + '*:patch:_hg_qapplied' +} + _hg_cmd_qfold() { _arguments -s -w : $_hg_global_opts $_h_commit_opts \ '(--keep,-k)'{-k,--keep}'[keep folded patch files]' \ diff --git a/.zfun/_mercurial b/.zfun/_mercurial new file mode 120000 --- /dev/null +++ b/.zfun/_mercurial @@ -0,0 +1,1 @@ +_hg \ No newline at end of file