1. 在多个工程中,又存在子目录的情况,global tags需要定制运行命令,这样每次都需要手动更新
2. 解决方案:在工程目录中文件.dir-locals.el,开启本目录或者子目录文件时,就会读取里面的变量值
((c-mode
(proj-dir . "e:/project1/")
(proj . "123")
(proj-name . "proj-name")))
3. 变量制定格式,see info Directory Variables
4. updategtags.sh
#!/usr/bin/sh
echo "`date` update gtags ..."
rm -rf file.list
find com -iname "*.[hc]" > file.list
find smtrans -iname "*.[hc]" >> file.list
/usr/bin/gtags -f file.list
(defconst +gtag-name+ "*updategtags*")
(defconst +gtag-proc+ "*updatetags*")
(de