7 Jul 2011 10:05
git-show-branch.el
Thien-Thi Nguyen <ttn <at> gnuvola.org>
2011-07-07 08:05:25 GMT
2011-07-07 08:05:25 GMT
Greetings earthlings,
Do you use Git? Are you a branch lover?
You know it! You show it!
The primary value of this code IMHO is NOT the output, but rather the
keymap, upon which you can hang all sorts of ref-based commands, kind of
like a tree trunk of enquiry and reflection. But that's no surprise for
branch lovers. For example, here is the func that ‘more-vc-git-show’
and ‘more-vc-git-rebase’ (both not yet published) use:
(defun more-vc-ref-at-point ()
"Return the reference at point as a string.
This is essentially the `symbol-at-point' under Emacs Lisp syntax."
(with-syntax-table emacs-lisp-mode-syntax-table
(substring-no-properties (thing-at-point 'symbol))))
The reason ‘more-vc-ref-at-point’ is not and most likely will never be
part of git-show-branch.el is to keep the latter simple.
thi
___________________________________________________
;;; git-show-branch.el
;;;
;;; Copyright (C) 2011 Thien-Thi Nguyen
;;;
;;; This file is part of ttn's personal elisp library, released under
;;; the terms of the GNU General Public License as published by the
;;; Free Software Foundation; either version 3, or (at your option) any
(Continue reading)
RSS Feed