leoliu pushed a commit to branch master in repository elpa. commit e953417ce0f4d1ceb45da9ef708a8645d0e558d3 Author: Leo Liu <sdl....@gmail.com> Date: Fri Mar 7 11:21:20 2014 +0800
Fix compatibility for locate-dominating-file --- ggtags.el | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ggtags.el b/ggtags.el index 2ecaa29..087a17b 100644 --- a/ggtags.el +++ b/ggtags.el @@ -377,17 +377,18 @@ Value is new modtime if updated." (concat (file-remote-p default-directory) ;; Resolves symbolic links (ggtags-process-string "global" "-pr")))) - ;; 'global -pr' resolves symlinks before checking - ;; the GTAGS file which could cause issues such as + ;; 'global -pr' resolves symlinks before checking the + ;; GTAGS file which could cause issues such as ;; https://github.com/leoliu/ggtags/issues/22, so ;; let's help it out. - (when-let (gtags (locate-dominating-file - default-directory - (lambda (dir) - (file-regular-p (expand-file-name "GTAGS" dir))))) + ;; + ;; Note: `locate-dominating-file' doesn't accept + ;; function for NAME before 24.3. + (let ((gtags (locate-dominating-file default-directory "GTAGS"))) ;; `file-truename' may strip the trailing '/' on ;; remote hosts, see http://debbugs.gnu.org/16851 - (file-name-as-directory (file-truename gtags))))) + (and gtags (file-regular-p gtags) + (file-name-as-directory (file-truename gtags)))))) (when ggtags-project-root (if (gethash ggtags-project-root ggtags-projects) (ggtags-find-project)