summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/autoload.el
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1993-07-14 20:56:19 +0000
committerRoland McGrath <roland@gnu.org>1993-07-14 20:56:19 +0000
commit952d7b21d0002a6e1ab1bc30d11247ec46f60e99 (patch)
tree65a25d106793c8986419c01e2c5f3745d30e2106 /lisp/emacs-lisp/autoload.el
parent8efc949b9dc2edfd7a800f897a6430134d8ecf91 (diff)
downloademacs-952d7b21d0002a6e1ab1bc30d11247ec46f60e99.tar.gz
(generate-file-autoloads): Fix FILE truename hacking to substring
SOURCE-TRUENAME instead of FILE.
Diffstat (limited to 'lisp/emacs-lisp/autoload.el')
-rw-r--r--lisp/emacs-lisp/autoload.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index 10f614f48c1..0950a1af574 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -122,13 +122,13 @@ are used."
;; 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