diff lisp/autoload.el @ 1733:5903b079bee1

[xemacs-hg @ 2003-10-07 21:52:12 by james] Use module-extensions instead of an explicit list of module extensions.
author james
date Tue, 07 Oct 2003 21:52:26 +0000
parents c3cf7db99b98
children 588465af3ca1
line wrap: on
line diff
--- a/lisp/autoload.el	Thu Oct 02 01:18:37 2003 +0000
+++ b/lisp/autoload.el	Tue Oct 07 21:52:26 2003 +0000
@@ -461,11 +461,9 @@
 marked by `generate-c-autoload-cookie' (which see).
 If FILE is being visited in a buffer, the contents of the buffer
 are used."
-  (let ((exists-p-format 
-	 "(file-exists-p (expand-file-name \"%s.%s\" module-directory))")
-	(autoloads-done '())
-	)
-
+  (let ((exists-p-format
+	 "(when (locate-file \"%s\" module-load-path module-extensions)\n")
+	autoloads-done)
     (save-excursion
       (save-restriction
 	(widen)
@@ -479,14 +477,7 @@
 	(if funlist
 	    (progn
 	      (message "Generating autoloads for %s..." trim-name)
-	      (princ "(when (or\n       " outbuf)
-	      (princ (format exists-p-format load-name "ell") outbuf)
-	      (princ "\n       " outbuf)
-	      (princ (format exists-p-format load-name "dll") outbuf)
-	      (princ "\n       " outbuf)
-	      (princ (format exists-p-format load-name "so") outbuf)
-	      ;; close the princ'd `or' form
-	      (princ ")\n       " outbuf)
+	      (princ (format exists-p-format load-name) outbuf)
 	      (dolist (arg funlist)
 		(goto-char (point-min))
 		(re-search-forward
@@ -508,14 +499,7 @@
 	      (return-from generate-c-file-autoloads-1 nil))
 	    
 	    (message "Generating autoloads for %s..." trim-name)
-	    (princ "(when (or\n       " outbuf)
-	    (princ (format exists-p-format load-name "ell") outbuf)
-	    (princ "\n       " outbuf)
-	    (princ (format exists-p-format load-name "dll") outbuf)
-	    (princ "\n       " outbuf)
-	    (princ (format exists-p-format load-name "so") outbuf)
-	    ;; close the princ'd `or' form
-	    (princ ")\n       " outbuf)
+	    (princ (format exists-p-format load-name) outbuf)
 	    (while match
 	      (forward-line 1)
 	      (let ((autoload (make-c-autoload load-name)))