leoliu pushed a commit to branch master in repository elpa. commit 70b1b7f95a313a975e35c83ab6c100ed262740cc Author: Leo Liu <sdl....@gmail.com> Date: Wed Mar 5 10:34:04 2014 +0800
Fix #34: New variable ggtags-global-always-update --- ggtags.el | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/ggtags.el b/ggtags.el index 379eadc..0fe7cae 100644 --- a/ggtags.el +++ b/ggtags.el @@ -105,6 +105,12 @@ automatically switches to 'global --single-update'." number) :group 'ggtags) +(defcustom ggtags-global-always-update nil + "If non-nil always update tags for current file on save." + :safe 'booleanp + :type 'boolean + :group 'ggtags) + (defcustom ggtags-project-duration 600 "Seconds to keep information of a project in memory." :type 'number @@ -1299,7 +1305,8 @@ Global and Emacs." (when (ggtags-find-project) (ggtags-project-update-mtime-maybe) ;; When oversize update on a per-save basis. - (when (and buffer-file-name (ggtags-project-oversize-p)) + (when (and buffer-file-name + (or ggtags-global-always-update (ggtags-project-oversize-p))) (ggtags-with-current-project (process-file "global" nil 0 nil "--single-update" (file-relative-name buffer-file-name))))))