* autoload.el (generate-file-autoloads): Correctly detect when the
buffer receiving the autoload forms is in a parent of or the same directory as FILE, even in the presence of symlinks.
This commit is contained in:
parent
8537f1cb3a
commit
ae553cad8e
1 changed files with 7 additions and 5 deletions
|
@ -122,11 +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))
|
||||
(if (and (< (length default-directory) (length file))
|
||||
(string= default-directory
|
||||
(substring file 0 (length default-directory))))
|
||||
(progn
|
||||
(setq file (substring file (length default-directory)))))
|
||||
(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)))))
|
||||
|
||||
(message "Generating autoloads for %s..." file)
|
||||
(save-excursion
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue