;; autoload.el --- maintain autoloads in loaddefs.el -*- lexical-binding: t -*-
-;; Copyright (C) 1991-1997, 2001-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1991-1997, 2001-2014 Free Software Foundation, Inc.
;; Author: Roland McGrath <roland@gnu.org>
;; Keywords: maint
;; (message "autoload of %S" (nth 1 form))
`(autoload ,(nth 1 form) ,file ,doc ,interactive ,type)))
- ((and expansion (memq car '(progn prog1)))
+ ((and expansion
+ (or (memq car '(progn prog1))
+ (and (eq car 'eval-when) (setq form (cdr form)))))
(let ((end (memq :autoload-end form)))
(when end ;Cut-off anything after the :autoload-end marker.
(setq form (copy-sequence form))
(if (stringp generated-autoload-load-name)
generated-autoload-load-name
(autoload-file-load-name absfile)))
+ ;; FIXME? Comparing file-names for equality with just equal
+ ;; is fragile, eg if one has an automounter prefix and one
+ ;; does not, but both refer to the same physical file.
(when (and outfile
(not
(if (memq system-type '(ms-dos windows-nt))
(princ `(push (purecopy
',(cons (intern package) version))
package--builtin-versions))
- (newline)))))
+ (princ "\n")))))
(goto-char (point-min))
(while (not (eobp))