[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Compilation and TAGS
From: |
John Smith |
Subject: |
Compilation and TAGS |
Date: |
Sun, 19 Aug 2001 11:08:40 +0100 (BST) |
Hello all.
We use gcc and GNU make to compile things. Unfortunately the makefiles
are sufficiently obscure that the default emacs commands for leaping to
the next compile error do not work.
I would like to set my "compilation-search-path" variable from the TAGS
data.
compilation-search-path comes from compile.el; I quote:
-------
(defcustom compilation-search-path '(nil)
"*List of directories to search for source files named in error messages.
Elements should be directory names, not file names of directories.
nil as an element means to try the default directory."
:type '(repeat (choice (const :tag "Default" nil)
(string :tag "Directory")))
:group 'compilation)
-------
Can someone offer a bit a lisp that will extract a list of directories
from the tags buffer and put the list into the compilation-search-path?
I guess the directories have to be absolute. And it all needs to work in
the Windows NT world.
Perhaps along the following lines:
(defun tags-table-directories ()
"Return a list of directories in the current tags table.
Assumes the tags table is the current buffer.
The directory names are absolute"
....
)
(defun set-compilation-path-from-tags ()
"Sets the compilation-seach-path to the directories referenced
in the current tags table"
(interactive)
(set-variable 'compilation-search-path set-compilation-path-from-tags )
)
(Yes I have probably got the syntax all wrong; my current emacs lisping is
by iterative guess work - not very efficient)
Thanks
John
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Compilation and TAGS,
John Smith <=