Created
July 8, 2009 07:30
-
-
Save eklitzke/142658 to your computer and use it in GitHub Desktop.
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
(require 'yelp) | |
(defun find-after (target xs) | |
(defun find-c (p ys) | |
(if p | |
(cons (car ys) nil) | |
(if (string-equal target (car ys)) | |
(cons target (find-c t (cdr ys))) | |
(cons (car ys) (find-c nil (cdr ys)))))) | |
(find-c nil xs)) | |
(defun find-file-root (root-sep &optional filename) | |
(let ((fname (if (null filename) | |
buffer-file-name | |
filename))) | |
(mapconcat 'identity (find-after "evan" (split-string fname "/")) "/"))) | |
(defun yelp-branch-path () (find-file-root "pg")) | |
(defun yelp-find-tag () | |
"This is a wrapper around find-tag that ensures that it uses | |
the correct etags database. It does this by ensuring that the | |
TAGS file used is the one in the current branch." | |
(let ((cb (yelp-branch-path))) | |
(if (stringp cb) | |
(setq tags-file-name (concat cb "/TAGS"))) | |
(call-interactively 'find-tag))) | |
(provide 'eck-yelp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment