From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/59112 Path: main.gmane.org!not-for-mail From: Stefan Newsgroups: gmane.emacs.pretest.bugs,gmane.emacs.gnus.general Subject: Re: Change in bytecomp.el breaks Gnus Date: Thu, 11 Nov 2004 16:55:07 -0500 Message-ID: References: <877jouepy8.fsf@telia.com> <200411111745.iABHji207636@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1100210142 19217 80.91.229.6 (11 Nov 2004 21:55:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Nov 2004 21:55:42 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, yamaoka@jpl.org, ding@gnus.org Original-X-From: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Thu Nov 11 22:55:31 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CSMuh-0000uU-00 for ; Thu, 11 Nov 2004 22:55:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CSN3D-0001Og-Lk for gebp-emacs-pretest-bug@gmane.org; Thu, 11 Nov 2004 17:04:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CSN39-0001Nt-D4 for emacs-pretest-bug@gnu.org; Thu, 11 Nov 2004 17:04:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CSN38-0001NH-2K for emacs-pretest-bug@gnu.org; Thu, 11 Nov 2004 17:04:14 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CSN37-0001N3-S3 for emacs-pretest-bug@gnu.org; Thu, 11 Nov 2004 17:04:13 -0500 Original-Received: from [206.47.199.164] (helo=simmts6-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CSMuJ-0008No-J3 for emacs-pretest-bug@gnu.org; Thu, 11 Nov 2004 16:55:07 -0500 Original-Received: from empanada.home ([67.71.33.130]) by simmts6-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20041111215507.EKNC1635.simmts6-srv.bellnexxia.net@empanada.home>; Thu, 11 Nov 2004 16:55:07 -0500 Original-Received: by empanada.home (Postfix, from userid 502) id 6C68F366457; Thu, 11 Nov 2004 16:55:07 -0500 (EST) Original-To: Luc Teirlinck In-Reply-To: <200411111745.iABHji207636@raven.dms.auburn.edu> (Luc Teirlinck's message of "Thu, 11 Nov 2004 11:45:44 -0600 (CST)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (darwin) X-BeenThere: emacs-pretest-bug@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: emacs-pretest-bug.gnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Errors-To: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.pretest.bugs:4573 gmane.emacs.gnus.general:59112 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:59112 > Your patch does not seem to solve a related problem I reported earlier > on emacs-devel, so it probably is not a complete solution: > Changes in byte compilation which must be less than a day old, have > strange effects. `winner' is no longer usable when winner.elc is > used, but still seems to work fine when winner.el is used. > After `emacs -q' I get the following ielm run: > *** Welcome to IELM *** Type (describe-mode) for help. ELISP> (load "winner") > t ELISP> (winner-sorted-window-list) > *** Eval error *** Symbol's function definition is void: t ELISP> (load "winner.el") > t ELISP> (winner-sorted-window-list) > (#) Hmm... the problem seems to be related to the fact that some `defsubst's are first turned into `defalias' but that the new defalias code gets surprised when it encounters those `defalias'es. I've installed the patch below which I think does The Right Thing(tm). But the distinction between top-level and non-top-level forms as well as several aspects of the byte-compiler are still a bit fuzzy in my mind. I think the patch not only fixes the problem but also fixes an older "problem" which is that code such as: (defun toto () (foobsfg x) (if toto (defalias 'foobsfg 'y))) did not complain about calling an unknown function `foobsfg'. Can someone who's already played a bit with bytecomp.el do a reality check? Stefan --- bytecomp.el 09 Nov 2004 09:27:47 -0500 2.157 +++ bytecomp.el 11 Nov 2004 16:35:49 -0500 @@ -3614,7 +3613,6 @@ (byte-defop-compiler-1 defconst byte-compile-defvar) (byte-defop-compiler-1 autoload) (byte-defop-compiler-1 lambda byte-compile-lambda-form) -(byte-defop-compiler-1 defalias) (defun byte-compile-defun (form) ;; This is not used for file-level defuns with doc strings. @@ -3716,7 +3714,8 @@ (error "`lambda' used as function name is invalid")) ;; Compile normally, but deal with warnings for the function being defined. -(defun byte-compile-defalias (form) +(put 'defalias 'byte-hunk-handler 'byte-compile-file-form-defalias) +(defun byte-compile-file-form-defalias (form) (if (and (consp (cdr form)) (consp (nth 1 form)) (eq (car (nth 1 form)) 'quote) (consp (cdr (nth 1 form)))