Gnus development mailing list
 help / color / mirror / Atom feed
From: Stefan <monnier@iro.umontreal.ca>
Cc: emacs-pretest-bug@gnu.org, yamaoka@jpl.org, ding@gnus.org
Subject: Re: Change in bytecomp.el breaks Gnus
Date: Thu, 11 Nov 2004 16:55:07 -0500	[thread overview]
Message-ID: <m17jos12x6.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <200411111745.iABHji207636@raven.dms.auburn.edu> (Luc Teirlinck's message of "Thu, 11 Nov 2004 11:45:44 -0600 (CST)")

> 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)
>    (#<window 3 on *ielm*>)

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)))

  reply	other threads:[~2004-11-11 21:55 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <877jouepy8.fsf@telia.com>
     [not found] ` <b9yd5ymkq11.fsf@jpl.org>
2004-11-11  7:40   ` Katsumi Yamaoka
2004-11-11 11:18     ` Katsumi Yamaoka
2004-11-11 17:45       ` Luc Teirlinck
2004-11-11 21:55         ` Stefan [this message]
2004-11-11 22:41           ` Luc Teirlinck
2004-11-11 22:54             ` Luc Teirlinck
2004-11-12  0:22           ` Katsumi Yamaoka
2004-11-12  3:57             ` Stefan Monnier
2004-11-12  4:30               ` Katsumi Yamaoka
2004-11-13 23:03                 ` Stefan
2004-11-14  0:14                   ` Katsumi Yamaoka
2004-11-14  5:21                     ` Stefan
2004-11-14  6:10                       ` Katsumi Yamaoka
2004-11-14  6:36                         ` Stefan
2004-11-14 13:44                           ` Katsumi Yamaoka
2004-11-14 17:29                         ` Luc Teirlinck
2004-11-14 19:17                           ` Stefan Monnier
2004-11-15 14:00                             ` Richard Stallman
2004-11-15 15:36                               ` Stefan Monnier
2004-11-15 23:22                                 ` Miles Bader
2004-11-15 23:28                                   ` Stefan Monnier
2004-11-15 23:38                                     ` Miles Bader
2004-11-15 23:44                                       ` Stefan Monnier
2004-11-15 23:57                               ` Luc Teirlinck
2004-11-16  1:29                                 ` Nick Roberts
2004-11-16  1:49                                   ` Luc Teirlinck
2004-11-16  2:19                                   ` Luc Teirlinck
2004-11-16 16:49                           ` Richard Stallman

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=m17jos12x6.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=ding@gnus.org \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=yamaoka@jpl.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.
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 NNTP newsgroup(s).