mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
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.
This commit is contained in:
parent
f861353b68
commit
df4e105910
1 changed files with 10 additions and 14 deletions
|
|
@ -264,7 +264,7 @@ expression, in which case we want to handle forms differently."
|
||||||
;; problems when the file contains non-ASCII characters.
|
;; problems when the file contains non-ASCII characters.
|
||||||
(with-current-buffer (find-file-noselect
|
(with-current-buffer (find-file-noselect
|
||||||
(autoload-ensure-file-writeable file))
|
(autoload-ensure-file-writeable file))
|
||||||
(if (zerop (buffer-size)) (insert (autoload-rubric file)))
|
(if (zerop (buffer-size)) (insert (autoload-rubric file nil t)))
|
||||||
(current-buffer))))
|
(current-buffer))))
|
||||||
|
|
||||||
(defun autoload-generated-file ()
|
(defun autoload-generated-file ()
|
||||||
|
|
@ -360,10 +360,7 @@ but adds an extra line to the output to modify `load-path'.
|
||||||
|
|
||||||
If FEATURE is non-nil, FILE will provide a feature. FEATURE may
|
If FEATURE is non-nil, FILE will provide a feature. FEATURE may
|
||||||
be a string naming the feature, otherwise it will be based on
|
be a string naming the feature, otherwise it will be based on
|
||||||
FILE's name.
|
FILE's name."
|
||||||
|
|
||||||
At present, a feature is in fact always provided, but this should
|
|
||||||
not be relied upon."
|
|
||||||
(let ((basename (file-name-nondirectory file))
|
(let ((basename (file-name-nondirectory file))
|
||||||
(lp (if (equal type "package") (setq type "autoloads"))))
|
(lp (if (equal type "package") (setq type "autoloads"))))
|
||||||
(concat ";;; " basename
|
(concat ";;; " basename
|
||||||
|
|
@ -372,15 +369,14 @@ not be relied upon."
|
||||||
";;; Code:\n\n"
|
";;; Code:\n\n"
|
||||||
(if lp
|
(if lp
|
||||||
;; `load-path' should contain only directory names.
|
;; `load-path' should contain only directory names.
|
||||||
"(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))\n\n"
|
"(add-to-list 'load-path (directory-file-name
|
||||||
(concat
|
(or (file-name-directory #$) (car load-path))))\n\n")
|
||||||
;; This is used outside of autoload.el, eg cus-dep, finder.
|
"\n"
|
||||||
"\n"
|
;; This is used outside of autoload.el, eg cus-dep, finder.
|
||||||
"(provide '"
|
(if feature
|
||||||
(if (stringp feature)
|
(format "(provide '%s)\n"
|
||||||
feature
|
(if (stringp feature) feature
|
||||||
(file-name-sans-extension basename))
|
(file-name-sans-extension basename))))
|
||||||
")\n"))
|
|
||||||
";; Local Variables:\n"
|
";; Local Variables:\n"
|
||||||
";; version-control: never\n"
|
";; version-control: never\n"
|
||||||
";; no-byte-compile: t\n"
|
";; no-byte-compile: t\n"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue