summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/autoload.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-04-14 18:05:42 +0300
committerEli Zaretskii <eliz@gnu.org>2013-04-14 18:05:42 +0300
commit5e00cfa51043b42d59061525fecd461d0b2d44f9 (patch)
tree778b18c0d34638ae5747a96ee9a56fd3e891fefd /lisp/emacs-lisp/autoload.el
parentc31abc6232a88ea088fc930577332a33ada87dde (diff)
downloademacs-5e00cfa51043b42d59061525fecd461d0b2d44f9.tar.gz
emacs-5e00cfa51043b42d59061525fecd461d0b2d44f9.tar.bz2
emacs-5e00cfa51043b42d59061525fecd461d0b2d44f9.zip
Fixed autoloads and byte compilation due to MSYS filename-butchering and xargs limitations.
Diffstat (limited to 'lisp/emacs-lisp/autoload.el')
-rw-r--r--lisp/emacs-lisp/autoload.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index edaecd7ff19..f9e691c153c 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -86,6 +86,18 @@ that text will be copied verbatim to `generated-autoload-file'.")
(defvar autoload-modified-buffers) ;Dynamically scoped var.
+(defun set-generated-autoload-file (file)
+ "Set value of `generated-autoload-file' from FILE.
+
+On systems other than MS-Windows, just sets the value
+of `generated-autoload-file'. On MS-Windows, converts /d/foo/bar
+form passed by MSYS Make into d:/foo/bar that Emacs can grok.
+This function is called from lisp/Makefile."
+ (when (and (eq system-type 'windows-nt)
+ (string-match "\\`/[a-zA-Z]/" file))
+ (setq file (concat (substring file 1 2) ":" (substring file 2))))
+ (setq generated-autoload-file file))
+
(defun make-autoload (form file &optional expansion)
"Turn FORM into an autoload or defvar for source file FILE.
Returns nil if FORM is not a special autoload form (i.e. a function definition