From: Andreas Gerler Date: Mon, 21 Dec 2015 10:13:05 +0000 (+0100) Subject: enable ggtags-mode only if GTAGS file is found. X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=09c4536862074b0b198c19e6f7d73ef89b871597;p=emacsconfig.git enable ggtags-mode only if GTAGS file is found. --- diff --git a/bba.org b/bba.org index 693edcb7..9ec51f65 100644 --- 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