[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master df4e105: autoload-rubric no longer provides a featu
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] master df4e105: autoload-rubric no longer provides a feature by default |
Date: |
Wed, 17 May 2017 12:43:27 -0400 (EDT) |
branch: master
commit df4e105910a983f42e77828809ab50611b454905
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>
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.
---
lisp/emacs-lisp/autoload.el | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index f6b09dc..8fe9401 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."
;; problems when the file contains non-ASCII characters.
(with-current-buffer (find-file-noselect
(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))))
(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
be a string naming the feature, otherwise it will be based on
-FILE's name.
-
-At present, a feature is in fact always provided, but this should
-not be relied upon."
+FILE's name."
(let ((basename (file-name-nondirectory file))
(lp (if (equal type "package") (setq type "autoloads"))))
(concat ";;; " basename
@@ -372,15 +369,14 @@ not be relied upon."
";;; Code:\n\n"
(if lp
;; `load-path' should contain only directory names.
- "(add-to-list 'load-path (directory-file-name (or
(file-name-directory #$) (car load-path))))\n\n"
- (concat
- ;; This is used outside of autoload.el, eg cus-dep, finder.
- "\n"
- "(provide '"
- (if (stringp feature)
- feature
- (file-name-sans-extension basename))
- ")\n"))
+ "(add-to-list 'load-path (directory-file-name
+ (or (file-name-directory #$) (car load-path))))\n\n")
+ "\n"
+ ;; This is used outside of autoload.el, eg cus-dep, finder.
+ (if feature
+ (format "(provide '%s)\n"
+ (if (stringp feature) feature
+ (file-name-sans-extension basename))))
";; Local Variables:\n"
";; version-control: never\n"
";; no-byte-compile: t\n"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master df4e105: autoload-rubric no longer provides a feature by default,
Glenn Morris <=