[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Good place to regenerate tags file and reload it for a given project
From: |
Peter Münster |
Subject: |
Re: Good place to regenerate tags file and reload it for a given project |
Date: |
Thu, 30 Jul 2009 21:44:01 +0200 (CEST) |
User-agent: |
Alpine 2.00 (LNX 1167 2008-08-23) |
On Thu, 30 Jul 2009, jch wrote:
> 2. What's a good way to automatically load a tags file for a
> project? The way I've thought about doing is to look for a tags file
> in the current directly, and then recursively look for a tags file in
> my parent directory. Does anyone adopt this approach, or something
> similar?
Something similar:
(defun my-find-tag(tagname)
"Fast version of find-tag."
(interactive (find-tag-interactive "Find tag: "))
(tags-reset-tags-tables)
(if (file-exists-p "TAGS")
(visit-tags-table "TAGS")
(if (file-exists-p "../TAGS")
(visit-tags-table "../TAGS")
(visit-tags-table "../../TAGS")))
(find-tag tagname))
(define-key esc-map "." 'my-find-tag)
But very probably someone will show up with a far better (and cleaner)
solution...
Cheers, Peter
--
Contact information: http://pmrb.free.fr/contact/