From 7599ba83f03626fcdad374ac9b67325efc6e27c6 Mon Sep 17 00:00:00 2001 From: "Tom Breton (Tehom)" Date: Fri, 12 Nov 2010 13:43:44 -0500 Subject: [PATCH] Better test for whether to add to info path --- elinstall.el | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/elinstall.el b/elinstall.el index fae8dec..67c662a 100644 --- a/elinstall.el +++ b/elinstall.el @@ -843,6 +843,16 @@ Return it as an absolute filename." (elinstall-expand-deffile-name generated-autoload-file) nil)))) +;;;_ , Informational +;;;_ . elinstall-dir-has-info + +;;$$IMPROVE ME - Can this test be made more precise? +(defun elinstall-dir-has-info (dir) + "Return non-nil if DIR has info files in it. +DIR should be an absolute path." + (or + (string-match "/info/" dir) + (directory-files dir nil "\\.info\\(-[0-9]+\\)?\\(\\.gz\\)?$"))) ;;;_ . Workers ;;;_ , elinstall-find-actions-for-file @@ -890,7 +900,6 @@ LOAD-PATH-ELEMENT, DIR, and PARAMETERS are interpreted as in load-path-element)) ,load-path-element ;;Is this still used? ,full-path)))) - ;;;_ , elinstall-find-actions-by-spec (defun elinstall-find-actions-by-spec (spec load-path-element path parameters) @@ -957,7 +966,7 @@ surrounds DIR. It may not yet have been added to load-path." ;;If any info files are present, do add-to-info-path ;;too. (if - (directory-files dirname nil "\.info$") + (elinstall-dir-has-info dirname) `(add-to-info-path ,(elinstall-get-parameter parameters 'def-file) -- 2.11.4.GIT