help-gnu-emacs
[Top][All Lists]
Advanced

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

VTags dynamic tags specification


From: Denis Golovan
Subject: VTags dynamic tags specification
Date: Sat, 27 Sep 2008 10:40:58 +0300

Hi, all

Does anybody uses VTags?
It works well, but I'd like to automate it's tags file adding.
Unfortunately, I have not managed to do that.
Every time after opening project file, it asks for tags file to enter
manually. In fact tags file lies in ./tmp/tags file relative to dpr.

Here is that .emacs part
;;======================VTAGS======================
(load "vtags")
(defun dsg-tags-add-table (file)
  "add tags table"
  (message "Tags %s" file)

  ;;That's where I try to tell it tags file <<<<<<<<<<<<<<
  ;(add-to-list 'tags-table-list file)
  ;(add-to-list 'tags-table-list (quote (file)))
  ;(setq tags-table-computed-list (tags-compute-list (get-tagfileinfo file)))
  ;(custom-set-variables
  ;  '(tags-table-list (quote (file)))
  ;)
  ;;No way works actually :( <<<<<<<<<<<<<<
  (vtags-mode)
  (message "Tags %s" file)
)

(defun dsg-tags-add ()
  "add tags table"
  (if (string-match "\\.dpr$" (buffer-file-name))
      (dsg-tags-add-table
         (concat (file-name-directory (buffer-file-name)) "tmp/tags")
      )
  )
)

(defun dsg-tags ()
  "add tags table"
  (interactive)
  (dsg-tags-add)
)


(add-hook 'find-file-hooks
  (function
    (lambda ()
       (dsg-tags-add)
    )
  )
)
;;======================VTAGS======================

I'm not a elisp guru, as you see :). So, please help

Thanks.

-- 
Best regards,
Denis Golovan




reply via email to

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