From unknown Sun Jun 22 00:11:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21429: 24.5; More robust test for calls to `package-initialize' in init file Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Sep 2015 14:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21429 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 21429@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.144163775523252 (code B ref -1); Mon, 07 Sep 2015 14:56:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Sep 2015 14:55:55 +0000 Received: from localhost ([127.0.0.1]:51741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZYxpq-00062y-PI for submit@debbugs.gnu.org; Mon, 07 Sep 2015 10:55:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43817) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZYxpo-00062q-OT for submit@debbugs.gnu.org; Mon, 07 Sep 2015 10:55:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYxpk-00051G-Vj for submit@debbugs.gnu.org; Mon, 07 Sep 2015 10:55:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYxpk-00051C-SP for submit@debbugs.gnu.org; Mon, 07 Sep 2015 10:55:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYxpf-00062R-SZ for bug-gnu-emacs@gnu.org; Mon, 07 Sep 2015 10:55:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYxpc-0004ya-1b for bug-gnu-emacs@gnu.org; Mon, 07 Sep 2015 10:55:43 -0400 Received: from [219.88.242.59] (port=43720 helo=mail.orcon.net.nz) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYxpb-0004wz-Ig for bug-gnu-emacs@gnu.org; Mon, 07 Sep 2015 10:55:39 -0400 Received: from [10.1.1.5] (202-150-102-33.bng1.avl.orcon.net.nz [202.150.102.33] (may be forged)) (authenticated bits=0) by mail.orcon.net.nz (8.14.3/8.14.3/Debian-9.4) with ESMTP id t87EQQi8018637 for ; Tue, 8 Sep 2015 02:26:27 +1200 Message-ID: <55ED9E92.9060702@orcon.net.nz> Date: Tue, 08 Sep 2015 02:26:26 +1200 From: Phil Sainty User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050804060205080105040808" X-Bayes-Prob: 0.0001 (Score 0: No Bayes scoring rules defined, tokens from: outbound) X-CanIt-Geo: ip=202.150.102.33; country=NZ; latitude=-41; longitude=174.0000; http://maps.google.com/maps?q=-41,174.0000&z=6 X-CanItPRO-Stream: base:outbound X-Canit-Stats-ID: 01PeeqqC5 - 81ee592c41be - 20150908 X-Scanned-By: CanIt (www . roaringpenguin . com) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is a multi-part message in MIME format. --------------050804060205080105040808 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit The code which checks the user's init file for calls to `package-initialize' doesn't take the optional argument to that function into account. --------------050804060205080105040808 Content-Type: text/x-patch; name="0001-More-robust-check-for-package-initialize-calls-in-in.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-More-robust-check-for-package-initialize-calls-in-in.pa"; filename*1="tch" >From e4031d15e635493b69e5402acec33861817303ad Mon Sep 17 00:00:00 2001 From: Phil Sainty Date: Tue, 8 Sep 2015 02:15:53 +1200 Subject: [PATCH] More robust check for `package-initialize' calls in init file. This function accepts an optional argument, but calls passing an argument would not have been detected. --- lisp/emacs-lisp/package.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 23247d7..45d66f6 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1838,12 +1838,12 @@ add a call to it along with some explanatory comments." (save-restriction (widen) (goto-char (point-min)) - (search-forward "(package-initialize)" nil 'noerror)))) + (re-search-forward "(package-initialize\\_>" nil 'noerror)))) ;; Don't visit the file if we don't have to. (with-temp-buffer (insert-file-contents user-init-file) (goto-char (point-min)) - (search-forward "(package-initialize)" nil 'noerror))))) + (re-search-forward "(package-initialize\\_>" nil 'noerror))))) (unless contains-init (with-current-buffer (or buffer (let ((delay-mode-hooks t)) -- 2.1.0 --------------050804060205080105040808-- From unknown Sun Jun 22 00:11:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21429: 24.5; More robust test for calls to `package-initialize' in init file Resent-From: Artur Malabarba Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Sep 2015 20:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21429 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Phil Sainty Cc: 21429@debbugs.gnu.org Reply-To: bruce.connor.am@gmail.com Received: via spool by 21429-submit@debbugs.gnu.org id=B21429.144165808127949 (code B ref 21429); Mon, 07 Sep 2015 20:35:01 +0000 Received: (at 21429) by debbugs.gnu.org; 7 Sep 2015 20:34:41 +0000 Received: from localhost ([127.0.0.1]:51867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZ37h-0007Gj-3X for submit@debbugs.gnu.org; Mon, 07 Sep 2015 16:34:41 -0400 Received: from mail-lb0-f195.google.com ([209.85.217.195]:35231) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZ37f-0007Gb-0H for 21429@debbugs.gnu.org; Mon, 07 Sep 2015 16:34:39 -0400 Received: by lbcao8 with SMTP id ao8so5541148lbc.2 for <21429@debbugs.gnu.org>; Mon, 07 Sep 2015 13:34:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=382VJ8V9OUiV2XNP2z0IAWQhJ0U09qHnMgUGG+5HZsA=; b=AFRPhZJ5sKzHpXzbacFzRk1hHPxRT3fTvq8awzPEqlvaEje7x9WosxDAitPL4KVWWc pKIDgKH/+4etQgGRhHoPSr/62qp1Gje76bWf2GnmsGhpLTNhxgmGhJFgBHfzaKDxXPmQ NKoOR/OJ44887uqFNe1H7YZIXnAne0/YuMZGPxlIEive54GA29yppuxYMFL56c2BK2xS KhKJVMUj0vfAcquHh0RJGncFBEIgsYTBvsTUFFK1FF6tvo3FXl2B5GNJWYS6fKc1+0Su R3S0QItS22peGLnKsN+MykRyRwvkpLPfnFJ9WaZeongmGJb89spQV8kIItvOugKaZ3b5 zjUg== MIME-Version: 1.0 X-Received: by 10.152.18.164 with SMTP id x4mr19126408lad.35.1441658078151; Mon, 07 Sep 2015 13:34:38 -0700 (PDT) Received: by 10.25.213.202 with HTTP; Mon, 7 Sep 2015 13:34:38 -0700 (PDT) In-Reply-To: <55ED9E92.9060702@orcon.net.nz> References: <55ED9E92.9060702@orcon.net.nz> Date: Mon, 7 Sep 2015 21:34:38 +0100 X-Google-Sender-Auth: yYHblmZ_JFBvCTeYvNcAlvmEevs Message-ID: From: Artur Malabarba Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Thanks, Phil. Looks good to me. Have you done the copyright paperwork? 2015-09-07 15:26 GMT+01:00 Phil Sainty : > The code which checks the user's init file for calls to > `package-initialize' doesn't take the optional argument to > that function into account. > From unknown Sun Jun 22 00:11:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21429: 24.5; More robust test for calls to `package-initialize' in init file Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Sep 2015 01:10:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21429 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: bruce.connor.am@gmail.com Cc: arturmalabarba@gmail.com, 21429@debbugs.gnu.org Received: via spool by 21429-submit@debbugs.gnu.org id=B21429.144167454319960 (code B ref 21429); Tue, 08 Sep 2015 01:10:03 +0000 Received: (at 21429) by debbugs.gnu.org; 8 Sep 2015 01:09:03 +0000 Received: from localhost ([127.0.0.1]:51942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZ7PC-0005Br-UX for submit@debbugs.gnu.org; Mon, 07 Sep 2015 21:09:03 -0400 Received: from [219.88.242.56] (port=56397 helo=mail.orcon.net.nz) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZ7PB-0005BL-5l for 21429@debbugs.gnu.org; Mon, 07 Sep 2015 21:09:01 -0400 Received: from webmail-1.orcon.net.nz ([10.253.37.40]) by mail.orcon.net.nz (8.14.3/8.14.3/Debian-9.4) with ESMTP id t8818urO039480; Tue, 8 Sep 2015 13:08:57 +1200 Received: from mail.orcon.net.nz (localhost [IPv6:::1]) by webmail-1.orcon.net.nz (Postfix) with ESMTP id 7F887201F68D; Tue, 8 Sep 2015 13:08:56 +1200 (NZST) Received: from wlg-office-ffw.catalyst.net.nz ([202.78.240.7]) via [10.253.37.253] by mail.orcon.net.nz with HTTP (HTTP/1.1 POST); Tue, 08 Sep 2015 13:08:56 +1200 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 08 Sep 2015 13:08:56 +1200 From: Phil Sainty In-Reply-To: References: <55ED9E92.9060702@orcon.net.nz> Message-ID: <9f56d03083e8dd4aa824f9caa49352a2@mail.orcon.net.nz> X-Sender: psainty@orcon.net.nz User-Agent: Orcon Webmail X-Bayes-Prob: 0.0001 (Score 0: No Bayes scoring rules defined, tokens from: outbound) X-Spam-Score: -2.99 () [Hold at 3.00] FREEMAIL_FROM:0.001, T_TO_NO_BRKTS_FREEMAIL:0.01, CC(NZ:-3) X-CanIt-Geo: ip=202.78.240.7; country=NZ; latitude=-41; longitude=174.0000; http://maps.google.com/maps?q=-41,174.0000&z=6 X-CanItPRO-Stream: base:outbound X-Canit-Stats-ID: 02Pep8Uzj - 42b18ef69c2c - 20150908 X-Scanned-By: CanIt (www . roaringpenguin . com) on 10.250.8.6 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 2015-09-08 08:34, Artur Malabarba wrote: > Have you done the copyright paperwork? Yes. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (psainty[at]orcon.net.nz) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [219.88.242.56 listed in list.dnswl.org] 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 2015-09-08 08:34, Artur Malabarba wrote: > Have you done the copyright paperwork? Yes. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (psainty[at]orcon.net.nz) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [219.88.242.56 listed in list.dnswl.org] 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS On 2015-09-08 08:34, Artur Malabarba wrote: > Have you done the copyright paperwork? Yes. From unknown Sun Jun 22 00:11:15 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Phil Sainty Subject: bug#21429: closed (Re: bug#21429: 24.5; More robust test for calls to `package-initialize' in init file) Message-ID: References: <55ED9E92.9060702@orcon.net.nz> X-Gnu-PR-Message: they-closed 21429 X-Gnu-PR-Package: emacs Reply-To: 21429@debbugs.gnu.org Date: Wed, 09 Sep 2015 11:15:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1441797303-26892-1" This is a multi-part message in MIME format... ------------=_1441797303-26892-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #21429: 24.5; More robust test for calls to `package-initialize' in init fi= le which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 21429@debbugs.gnu.org. --=20 21429: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D21429 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1441797303-26892-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 21429-done) by debbugs.gnu.org; 9 Sep 2015 11:14:39 +0000 Received: from localhost ([127.0.0.1]:53408 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZdKo-0006z2-PL for submit@debbugs.gnu.org; Wed, 09 Sep 2015 07:14:38 -0400 Received: from mail-la0-f43.google.com ([209.85.215.43]:34132) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZdKm-0006yu-Bx for 21429-done@debbugs.gnu.org; Wed, 09 Sep 2015 07:14:37 -0400 Received: by laeb10 with SMTP id b10so4467308lae.1 for <21429-done@debbugs.gnu.org>; Wed, 09 Sep 2015 04:14:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=VmrIYtTAGRlzNCwJa2k9V7FJOgbAzAIOeWQp9CnBmQo=; b=GpSSWaUL+DnLSck0uIJyc1zlxhbsv5JWG5bcGE6i7D6bnP5O0lhzLd274A1bSVjQbb Y3mxHGtmLyr7XUgMc3+L9y3kpk7MgciaMxRVC7PlUktq0sDfXh2Iw1AhhS1WdrwbsVrD dn/zRd768BwY6hEQs48CVPqPEPb7fXQtwvfZvQb1cMSY8zj3NR375zaXI4GEc0z2RiDy EqltSocttkNjhHk4WrrwgaiSsNJaRIYx3LrH8Zr2n0zdfEUNwHecyZIt/FVVs8Roea7R K5aV98Oh8L2FnypcRjgyfr/nyF7HYvufFgD/AqqQL+3wQNr9JrNDibWZBuG0l3/ANat9 l8gA== MIME-Version: 1.0 X-Received: by 10.112.54.169 with SMTP id k9mr3679886lbp.95.1441797275330; Wed, 09 Sep 2015 04:14:35 -0700 (PDT) Received: by 10.25.213.202 with HTTP; Wed, 9 Sep 2015 04:14:35 -0700 (PDT) In-Reply-To: <9f56d03083e8dd4aa824f9caa49352a2@mail.orcon.net.nz> References: <55ED9E92.9060702@orcon.net.nz> <9f56d03083e8dd4aa824f9caa49352a2@mail.orcon.net.nz> Date: Wed, 9 Sep 2015 12:14:35 +0100 X-Google-Sender-Auth: cxOqyWgfqUEipiyBDP4GCguOCSA Message-ID: Subject: Re: bug#21429: 24.5; More robust test for calls to `package-initialize' in init file From: Artur Malabarba To: 21429-done@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21429-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: bruce.connor.am@gmail.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Pushed. Thanks again. 2015-09-08 2:08 GMT+01:00 Phil Sainty : > On 2015-09-08 08:34, Artur Malabarba wrote: >> >> Have you done the copyright paperwork? > > > Yes. > ------------=_1441797303-26892-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 7 Sep 2015 14:55:55 +0000 Received: from localhost ([127.0.0.1]:51741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZYxpq-00062y-PI for submit@debbugs.gnu.org; Mon, 07 Sep 2015 10:55:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43817) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZYxpo-00062q-OT for submit@debbugs.gnu.org; Mon, 07 Sep 2015 10:55:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYxpk-00051G-Vj for submit@debbugs.gnu.org; Mon, 07 Sep 2015 10:55:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYxpk-00051C-SP for submit@debbugs.gnu.org; Mon, 07 Sep 2015 10:55:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYxpf-00062R-SZ for bug-gnu-emacs@gnu.org; Mon, 07 Sep 2015 10:55:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYxpc-0004ya-1b for bug-gnu-emacs@gnu.org; Mon, 07 Sep 2015 10:55:43 -0400 Received: from [219.88.242.59] (port=43720 helo=mail.orcon.net.nz) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYxpb-0004wz-Ig for bug-gnu-emacs@gnu.org; Mon, 07 Sep 2015 10:55:39 -0400 Received: from [10.1.1.5] (202-150-102-33.bng1.avl.orcon.net.nz [202.150.102.33] (may be forged)) (authenticated bits=0) by mail.orcon.net.nz (8.14.3/8.14.3/Debian-9.4) with ESMTP id t87EQQi8018637 for ; Tue, 8 Sep 2015 02:26:27 +1200 Message-ID: <55ED9E92.9060702@orcon.net.nz> Date: Tue, 08 Sep 2015 02:26:26 +1200 From: Phil Sainty User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: 24.5; More robust test for calls to `package-initialize' in init file Content-Type: multipart/mixed; boundary="------------050804060205080105040808" X-Bayes-Prob: 0.0001 (Score 0: No Bayes scoring rules defined, tokens from: outbound) X-CanIt-Geo: ip=202.150.102.33; country=NZ; latitude=-41; longitude=174.0000; http://maps.google.com/maps?q=-41,174.0000&z=6 X-CanItPRO-Stream: base:outbound X-Canit-Stats-ID: 01PeeqqC5 - 81ee592c41be - 20150908 X-Scanned-By: CanIt (www . roaringpenguin . com) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is a multi-part message in MIME format. --------------050804060205080105040808 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit The code which checks the user's init file for calls to `package-initialize' doesn't take the optional argument to that function into account. --------------050804060205080105040808 Content-Type: text/x-patch; name="0001-More-robust-check-for-package-initialize-calls-in-in.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-More-robust-check-for-package-initialize-calls-in-in.pa"; filename*1="tch" >From e4031d15e635493b69e5402acec33861817303ad Mon Sep 17 00:00:00 2001 From: Phil Sainty Date: Tue, 8 Sep 2015 02:15:53 +1200 Subject: [PATCH] More robust check for `package-initialize' calls in init file. This function accepts an optional argument, but calls passing an argument would not have been detected. --- lisp/emacs-lisp/package.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 23247d7..45d66f6 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1838,12 +1838,12 @@ add a call to it along with some explanatory comments." (save-restriction (widen) (goto-char (point-min)) - (search-forward "(package-initialize)" nil 'noerror)))) + (re-search-forward "(package-initialize\\_>" nil 'noerror)))) ;; Don't visit the file if we don't have to. (with-temp-buffer (insert-file-contents user-init-file) (goto-char (point-min)) - (search-forward "(package-initialize)" nil 'noerror))))) + (re-search-forward "(package-initialize\\_>" nil 'noerror))))) (unless contains-init (with-current-buffer (or buffer (let ((delay-mode-hooks t)) -- 2.1.0 --------------050804060205080105040808-- ------------=_1441797303-26892-1--