diff options
| author | Glenn Morris | 2017-05-17 12:43:23 -0400 |
|---|---|---|
| committer | Glenn Morris | 2017-05-17 12:43:23 -0400 |
| commit | df4e105910a983f42e77828809ab50611b454905 (patch) | |
| tree | ecd07b980a557625379c53d09758837d642837b0 | |
| parent | f861353b684e5c40dade61f89fd1742e4226a282 (diff) | |
| download | emacs-df4e105910a983f42e77828809ab50611b454905.tar.gz emacs-df4e105910a983f42e77828809ab50611b454905.zip | |
autoload-rubric no longer provides a feature by default
* lisp/emacs-lisp/autoload.el (autoload-rubric):
Stop providing a feature unless explicitly requested.
(autoload-find-generated-file): Update autoload-rubric call.
| -rw-r--r-- | lisp/emacs-lisp/autoload.el | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index f6b09dcf31d..8fe94013700 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el | |||
| @@ -264,7 +264,7 @@ expression, in which case we want to handle forms differently." | |||
| 264 | ;; problems when the file contains non-ASCII characters. | 264 | ;; problems when the file contains non-ASCII characters. |
| 265 | (with-current-buffer (find-file-noselect | 265 | (with-current-buffer (find-file-noselect |
| 266 | (autoload-ensure-file-writeable file)) | 266 | (autoload-ensure-file-writeable file)) |
| 267 | (if (zerop (buffer-size)) (insert (autoload-rubric file))) | 267 | (if (zerop (buffer-size)) (insert (autoload-rubric file nil t))) |
| 268 | (current-buffer)))) | 268 | (current-buffer)))) |
| 269 | 269 | ||
| 270 | (defun autoload-generated-file () | 270 | (defun autoload-generated-file () |
| @@ -360,10 +360,7 @@ but adds an extra line to the output to modify `load-path'. | |||
| 360 | 360 | ||
| 361 | If FEATURE is non-nil, FILE will provide a feature. FEATURE may | 361 | If FEATURE is non-nil, FILE will provide a feature. FEATURE may |
| 362 | be a string naming the feature, otherwise it will be based on | 362 | be a string naming the feature, otherwise it will be based on |
| 363 | FILE's name. | 363 | FILE's name." |
| 364 | |||
| 365 | At present, a feature is in fact always provided, but this should | ||
| 366 | not be relied upon." | ||
| 367 | (let ((basename (file-name-nondirectory file)) | 364 | (let ((basename (file-name-nondirectory file)) |
| 368 | (lp (if (equal type "package") (setq type "autoloads")))) | 365 | (lp (if (equal type "package") (setq type "autoloads")))) |
| 369 | (concat ";;; " basename | 366 | (concat ";;; " basename |
| @@ -372,15 +369,14 @@ not be relied upon." | |||
| 372 | ";;; Code:\n\n" | 369 | ";;; Code:\n\n" |
| 373 | (if lp | 370 | (if lp |
| 374 | ;; `load-path' should contain only directory names. | 371 | ;; `load-path' should contain only directory names. |
| 375 | "(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))\n\n" | 372 | "(add-to-list 'load-path (directory-file-name |
| 376 | (concat | 373 | (or (file-name-directory #$) (car load-path))))\n\n") |
| 377 | ;; This is used outside of autoload.el, eg cus-dep, finder. | 374 | "\n" |
| 378 | "\n" | 375 | ;; This is used outside of autoload.el, eg cus-dep, finder. |
| 379 | "(provide '" | 376 | (if feature |
| 380 | (if (stringp feature) | 377 | (format "(provide '%s)\n" |
| 381 | feature | 378 | (if (stringp feature) feature |
| 382 | (file-name-sans-extension basename)) | 379 | (file-name-sans-extension basename)))) |
| 383 | ")\n")) | ||
| 384 | ";; Local Variables:\n" | 380 | ";; Local Variables:\n" |
| 385 | ";; version-control: never\n" | 381 | ";; version-control: never\n" |
| 386 | ";; no-byte-compile: t\n" | 382 | ";; no-byte-compile: t\n" |