[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Select Tags Table in a Single Buffer
From: |
Filipp Gunbin |
Subject: |
Re: Select Tags Table in a Single Buffer |
Date: |
Mon, 04 Feb 2013 10:01:32 +0400 |
User-agent: |
Gnus/5.1299999999999999 (Gnus v5.13) Emacs/24.2 (cygwin) |
On 03/02/2013 03:18 +0400, Josiah Schwab wrote:
> Hi All,
>
> I want to select the tags table in a single buffer in a way such that
> there is no effect on any other buffers.
>
> The motivation for this is that I am writing simple buffer-local
> minor-mode. As part of it, I want to have a specific tags file
> loaded/unloaded when the minor-mode is toggled (on/off).
>
> I'm not particularly experienced with either elisp or tags, but I read
> the Emacs tags documentation and looked at etags.el (in v24.2).
>
> At first blush, it seemed like this would be straightforward by using
> the local argument to visit-tags-table.
>
> (visit-tags-table my-tags-file-name t)
>
> Indeed, this sets a buffer-local value of tags-file-name. However,
> tags-table-list is global, so the behavior of tags in all other
> buffers is affected by this action.
>
> Is anyone aware of a way to achieve the (lack of) effect that I was
> hoping to have?
>
> Best,
> Josiah
`(make-local-variable 'tags-table-list)' will help hopefully. But there
probably are other variables which are not buffer-local and which could
get into your way, so I'd check all variables that etags module uses.
Also, see (info "(emacs) Locals").
--
Filipp Gunbin