changeset 301:228f11416f28

Merge
author Augie Fackler <raf@durin42.com>
date Mon, 12 Nov 2012 16:41:19 -0600
parents 276c14c5eec0 (diff) 142fb39e4e55 (current diff)
children a9e3c2ca6fa5
files
diffstat 9 files changed, 46 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- 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 ()
--- 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))))
--- 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
--- 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))
   )
--- 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")))
--- 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
--- 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
--- 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]' \
new file mode 120000
--- /dev/null
+++ b/.zfun/_mercurial
@@ -0,0 +1,1 @@
+_hg
\ No newline at end of file