]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
enable ggtags-mode only if GTAGS file is found.
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Mon, 21 Dec 2015 10:13:05 +0000 (11:13 +0100)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Mon, 21 Dec 2015 10:13:05 +0000 (11:13 +0100)
bba.org

diff --git a/bba.org b/bba.org
index 693edcb7c7bc8833fe49a8c9b4bd10611c01e2aa..9ec51f65f178d9775d171bf74117e9d8cf2b7bca 100644 (file)
--- a/bba.org
+++ b/bba.org
@@ -1870,16 +1870,19 @@ If you are new to tags check [[http://tuhdo.github.io/c-ide.html][this]].
         (require 'helm-gtags)
         (add-hook 'puppet-mode-hook
                   (lambda()
-                    (ggtags-mode 1)
-                    (helm-gtags-mode 1)))
+                    (if (locate-dominating-file (file-name-directory buffer-file-name) "GTAGS")
+                        (ggtags-mode 1)
+                      (helm-gtags-mode 1))))
         (add-hook 'python-mode-hook
                   (lambda()
-                    (ggtags-mode 1)
-                    (helm-gtags-mode 1)))
+                    (if (locate-dominating-file (file-name-directory buffer-file-name) "GTAGS")
+                        (ggtags-mode 1)
+                      (helm-gtags-mode 1))))
         (add-hook 'cperl-mode-hook
                   (lambda()
-                    (ggtags-mode 1)
-                    (helm-gtags-mode 1)))
+                    (if (locate-dominating-file (file-name-directory buffer-file-name) "GTAGS")
+                        (ggtags-mode 1)
+                      (helm-gtags-mode 1))))
         ))
 #+END_SRC