[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: best practices for TAGS

From: Philipp Haselwarter
Subject: Re: best practices for TAGS
Date: Tue, 06 Dec 2011 03:20:25 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.91 (gnu/linux)

I'd make a buffer local variable for the tags file name on your
`cc-mode-hook' or something suitable, using for example

(let ((dir (locate-dominating-file default-directory "TAGS")))
  (if dir
      (set (make-local-variable 'my-local-tags-fn)
        (expand-file-name "TAGS" dir))
    (message "TAGS not found")))

then call etags on your after-save-hook if the variable is set

(if (bound-and-true-p my-buffer-local-tags-filename)
 (start-process "regen-TAGS" nil "etags.emacs" "-o" 
my-buffer-local-tags-filename "-a"

Philipp Haselwarter

reply via email to

[Prev in Thread] Current Thread [Next in Thread]