unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#21429: 24.5; More robust test for calls to `package-initialize' in init file
@ 2015-09-07 14:26 Phil Sainty
  2015-09-07 20:34 ` Artur Malabarba
  0 siblings, 1 reply; 4+ messages in thread
From: Phil Sainty @ 2015-09-07 14:26 UTC (permalink / raw)
  To: 21429

[-- Attachment #1: Type: text/plain, Size: 144 bytes --]

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.


[-- Attachment #2: 0001-More-robust-check-for-package-initialize-calls-in-in.patch --]
[-- Type: text/x-patch, Size: 1438 bytes --]

From e4031d15e635493b69e5402acec33861817303ad Mon Sep 17 00:00:00 2001
From: Phil Sainty <psainty@orcon.net.nz>
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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#21429: 24.5; More robust test for calls to `package-initialize' in init file
  2015-09-07 14:26 bug#21429: 24.5; More robust test for calls to `package-initialize' in init file Phil Sainty
@ 2015-09-07 20:34 ` Artur Malabarba
  2015-09-08  1:08   ` Phil Sainty
  0 siblings, 1 reply; 4+ messages in thread
From: Artur Malabarba @ 2015-09-07 20:34 UTC (permalink / raw)
  To: Phil Sainty; +Cc: 21429

Thanks, Phil. Looks good to me.

Have you done the copyright paperwork?

2015-09-07 15:26 GMT+01:00 Phil Sainty <psainty@orcon.net.nz>:
> 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.
>





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#21429: 24.5; More robust test for calls to `package-initialize' in init file
  2015-09-07 20:34 ` Artur Malabarba
@ 2015-09-08  1:08   ` Phil Sainty
  2015-09-09 11:14     ` Artur Malabarba
  0 siblings, 1 reply; 4+ messages in thread
From: Phil Sainty @ 2015-09-08  1:08 UTC (permalink / raw)
  To: bruce.connor.am; +Cc: arturmalabarba, 21429

On 2015-09-08 08:34, Artur Malabarba wrote:
> Have you done the copyright paperwork?

Yes.






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#21429: 24.5; More robust test for calls to `package-initialize' in init file
  2015-09-08  1:08   ` Phil Sainty
@ 2015-09-09 11:14     ` Artur Malabarba
  0 siblings, 0 replies; 4+ messages in thread
From: Artur Malabarba @ 2015-09-09 11:14 UTC (permalink / raw)
  To: 21429-done

Pushed.
Thanks again.

2015-09-08 2:08 GMT+01:00 Phil Sainty <psainty@orcon.net.nz>:
> On 2015-09-08 08:34, Artur Malabarba wrote:
>>
>> Have you done the copyright paperwork?
>
>
> Yes.
>





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-09-09 11:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-07 14:26 bug#21429: 24.5; More robust test for calls to `package-initialize' in init file Phil Sainty
2015-09-07 20:34 ` Artur Malabarba
2015-09-08  1:08   ` Phil Sainty
2015-09-09 11:14     ` Artur Malabarba

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).