changeset 4089:410395998370

(generate-file-autoloads): Fix FILE truename hacking to substring SOURCE-TRUENAME instead of FILE.
author Roland McGrath <roland@gnu.org>
date Wed, 14 Jul 1993 20:56:19 +0000
parents bea0be5ab35e
children afa2afad53c4
files lisp/emacs-lisp/autoload.el
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/autoload.el	Wed Jul 14 16:49:30 1993 +0000
+++ b/lisp/emacs-lisp/autoload.el	Wed Jul 14 20:56:19 1993 +0000
@@ -122,13 +122,13 @@
     ;; subdirectory of the current buffer's directory, we'll make it
     ;; relative to the current buffer's directory.
     (setq file (expand-file-name file))
-    (let ((source-truename (file-truename file))
-	  (dir-truename (file-name-as-directory
-			 (file-truename default-directory))))
-      (if (and (< (length dir-truename) (length source-truename))
-	       (string= dir-truename
-			(substring source-truename 0 (length dir-truename))))
-	  (setq file (substring file (length dir-truename)))))
+    (let* ((source-truename (file-truename file))
+	   (dir-truename (file-name-as-directory
+			  (file-truename default-directory)))
+	   (len (length dir-truename)))
+      (if (and (< len (length source-truename))
+	       (string= dir-truename (substring source-truename 0 len)))
+	  (setq file (substring source-truename len))))
 
     (message "Generating autoloads for %s..." file)
     (save-excursion