From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chris Feng Newsgroups: gmane.emacs.bugs Subject: bug#22817: 25.0.91; [PATCH] Include versioned preloaded libraries in `package--builtin-versions' Date: Fri, 26 Feb 2016 20:37:33 +0800 Message-ID: <86r3fzy7ea.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456490306 16066 80.91.229.3 (26 Feb 2016 12:38:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Feb 2016 12:38:26 +0000 (UTC) To: 22817@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 26 13:38:18 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aZHf0-0006B8-4K for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Feb 2016 13:38:18 +0100 Original-Received: from localhost ([::1]:49346 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZHet-0001tR-VG for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Feb 2016 07:38:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZHel-0001st-R5 for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 07:38:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZHek-0001ls-Fq for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 07:38:03 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZHek-0001lo-D7 for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 07:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aZHek-0000cn-8w for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 07:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Chris Feng Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Feb 2016 12:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 22817 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14564902702379 (code B ref -1); Fri, 26 Feb 2016 12:38:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Feb 2016 12:37:50 +0000 Original-Received: from localhost ([127.0.0.1]:46993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZHeY-0000cJ-B2 for submit@debbugs.gnu.org; Fri, 26 Feb 2016 07:37:50 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33186) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZHeW-0000c6-Fi for submit@debbugs.gnu.org; Fri, 26 Feb 2016 07:37:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZHeQ-0001i8-Cn for submit@debbugs.gnu.org; Fri, 26 Feb 2016 07:37:43 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:44192) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZHeQ-0001i4-9B for submit@debbugs.gnu.org; Fri, 26 Feb 2016 07:37:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZHeP-0001q9-43 for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 07:37:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZHeO-0001hs-04 for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 07:37:41 -0500 Original-Received: from mail-pa0-x22f.google.com ([2607:f8b0:400e:c03::22f]:35291) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZHeN-0001hY-Kp for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 07:37:39 -0500 Original-Received: by mail-pa0-x22f.google.com with SMTP id ho8so52115286pac.2 for ; Fri, 26 Feb 2016 04:37:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version; bh=671NeKvPamAMLIeqrYdcUs4na6PrWIm9tyq4GxlY6Fg=; b=m1ma3bZSgq1qSbkWwoErxHw7qqey+OGgTOmCmVQJIok120nY5WZBdTJu6e/HuQ/DpT q6R48I7WJci9v/HrfoNQ6dG50n8kkg6OYEi7kSjNjXeWd5SYxyYKEHZDGkVfLyd6tqQ+ dhpcztq8TM9LZnXKzZtuR+MPLH/CL2U0l+uQ94PqPFg7pXAHGeWMHPG4ngS3Gc3zeqV8 8pvHX2kCi+syAMCcgGErt/B7TCuqmmPVO4Q7zLbEwYaVjEuBlgtYL1qmHzRI1buDiGDQ /4UgEsmCKya3Vm5RdxtMBAVunQwb7sJ4GWuPJnw8FAblvO+l10Q0EpemmqJH4Nsbu3qA 0zXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=671NeKvPamAMLIeqrYdcUs4na6PrWIm9tyq4GxlY6Fg=; b=Ssa6ts2h5WwUrjbWScIPyOQxUIKCgq9+8KWMWkuzyuXbZLMOvaIGQHvLaEsxNgiWfr Vk74pETVcuqGkZDXB9tUtIVF2k3UJBV6xxRykgj3UAoQ1FwacEW/ZeGEUReBfcl5uWJ7 54fjBw91g4xkB8qhlrPHyflS1BJQKaXVjAR47+IeIARtwqQZJIOaNIboOse6FOKGzRlM rwoK++1Wun3R4kSzbPzn98lWlYGGos+YmJDZvTBNAot4k/N2NIRf1Wi5XpDfjcez8Cr1 ag0nMtBnIGSXMD2WFNwRALCRLSJ3BLn+/tgyysfBlZGpKm1NEjinO6CuwxBWICun8XFe TV6w== X-Gm-Message-State: AD7BkJLoqe2FmAT4al00WeusWWrlL31aE4Ho1du4XsQCiq6gAp9ifbEXkfKYX3Nxm41hhA== X-Received: by 10.66.228.97 with SMTP id sh1mr1668789pac.77.1456490258400; Fri, 26 Feb 2016 04:37:38 -0800 (PST) Original-Received: from tpx ([2001:da8:200:900e::3b42:7427]) by smtp.googlemail.com with ESMTPSA id m16sm19241133pfi.75.2016.02.26.04.37.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Feb 2016 04:37:37 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:113879 Archived-At: 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