From: Chris Feng <chris.w.feng@gmail.com>
To: 22817@debbugs.gnu.org
Subject: bug#22817: 25.0.91; [PATCH] Include versioned preloaded libraries in `package--builtin-versions'
Date: Fri, 26 Feb 2016 20:37:33 +0800 [thread overview]
Message-ID: <86r3fzy7ea.fsf@gmail.com> (raw)
Currently `package--builtin-versions' does not contain versioned preloaded
libraries (cl-generic, tabulated-list), which makes package.el believe they're
not builtin and install the versions from ELPA. This patch fixes the problem.
Also, since `package--builtin-versions' is now complete, should we remove the
version info in `package--builtins'?
Chris
---
* lisp/emacs-lisp/autoload.el (update-directory-autoloads): Do not exclude
preloaded libraries or remove entries generated for them.
(autoload-generate-file-autoloads): Do not generate autoload statements for
preloaded libraries.
---
lisp/emacs-lisp/autoload.el | 57 ++++++++++++++++++++++-----------------------
1 file changed, 28 insertions(+), 29 deletions(-)
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index e688d6b..2f2c856 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -578,22 +578,24 @@ autoload-generate-file-autoloads
package--builtin-versions))
(princ "\n")))))
- (goto-char (point-min))
- (while (not (eobp))
- (skip-chars-forward " \t\n\f")
- (cond
- ((looking-at (regexp-quote generate-autoload-cookie))
- ;; If not done yet, figure out where to insert this text.
- (unless output-start
- (setq output-start (autoload--setup-output
- otherbuf outbuf absfile load-name)))
- (autoload--print-cookie-text output-start load-name file))
- ((looking-at ";")
- ;; Don't read the comment.
- (forward-line 1))
- (t
- (forward-sexp 1)
- (forward-line 1))))))
+ ;; Do not insert autoload entries for excluded files.
+ (unless (member absfile autoload-excludes)
+ (goto-char (point-min))
+ (while (not (eobp))
+ (skip-chars-forward " \t\n\f")
+ (cond
+ ((looking-at (regexp-quote generate-autoload-cookie))
+ ;; If not done yet, figure out where to insert this text.
+ (unless output-start
+ (setq output-start (autoload--setup-output
+ otherbuf outbuf absfile load-name)))
+ (autoload--print-cookie-text output-start load-name file))
+ ((looking-at ";")
+ ;; Don't read the comment.
+ (forward-line 1))
+ (t
+ (forward-sexp 1)
+ (forward-line 1)))))))
(when output-start
(let ((secondary-autoloads-file-buf
@@ -810,9 +812,7 @@ update-directory-autoloads
((not (stringp file)))
((or (not (file-exists-p file))
;; Remove duplicates as well, just in case.
- (member file done)
- ;; If the file is actually excluded.
- (member (expand-file-name file) autoload-excludes))
+ (member file done))
;; Remove the obsolete section.
(autoload-remove-section (match-beginning 0)))
((not (time-less-p (nth 4 form)
@@ -830,16 +830,15 @@ update-directory-autoloads
;; Elements remaining in FILES have no existing autoload sections yet.
(let ((no-autoloads-time (or last-time '(0 0 0 0))) file-time)
(dolist (file files)
- (cond
- ((member (expand-file-name file) autoload-excludes) nil)
- ;; Passing nil as second argument forces
- ;; autoload-generate-file-autoloads to look for the right
- ;; spot where to insert each autoloads section.
- ((setq file-time
- (autoload-generate-file-autoloads file nil buffer-file-name))
- (push file no-autoloads)
- (if (time-less-p no-autoloads-time file-time)
- (setq no-autoloads-time file-time)))))
+ ;; Passing nil as second argument forces
+ ;; autoload-generate-file-autoloads to look for the right
+ ;; spot where to insert each autoloads section.
+ (setq file-time
+ (autoload-generate-file-autoloads file nil buffer-file-name))
+ (when file-time
+ (push file no-autoloads)
+ (if (time-less-p no-autoloads-time file-time)
+ (setq no-autoloads-time file-time))))
(when no-autoloads
;; Sort them for better readability.
--
2.7.0
next reply other threads:[~2016-02-26 12:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 12:37 Chris Feng [this message]
2016-02-27 1:24 ` bug#22817: 25.0.91; [PATCH] Include versioned preloaded libraries in `package--builtin-versions' Chris Feng
2016-07-12 13:19 ` Stefan Monnier
[not found] ` <CAP4=87Gh_kdrQEKMQEMinP_vK2+qM6kVD7omjbqg2UwO5CFong@mail.gmail.com>
2016-07-12 14:28 ` bug#22817: Fwd: " Chris Feng
[not found] ` <jwv37ne7whc.fsf-monnier+Inbox@gnu.org>
2016-07-12 15:03 ` Chris Feng
2016-07-12 16:16 ` Stefan Monnier
2016-07-13 12:17 ` Chris Feng
[not found] ` <834m7s8cyl.fsf@gnu.org>
2016-07-14 19:10 ` Stefan Monnier
2016-07-15 6:25 ` John Wiegley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86r3fzy7ea.fsf@gmail.com \
--to=chris.w.feng@gmail.com \
--cc=22817@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.