Gnus development mailing list
 help / color / mirror / Atom feed
* Why can't `gnus-draft-setup' be bytecompiled?
@ 1998-03-09 23:01 SL Baur
  1998-03-09 23:19 ` Hrvoje Niksic
  1998-03-14  2:29 ` Hallvard B Furuseth
  0 siblings, 2 replies; 11+ messages in thread
From: SL Baur @ 1998-03-09 23:01 UTC (permalink / raw)


`gnus-draft-setup' is wrapped in a progn and has the annotation:

;;;!!!If this is byte-compiled, it fails miserably.
;;;!!!I have no idea why.

I just tried it bytecompiled and it seemed to work.  What was/is broken
about it?  If it's an editor bug I want to fix it.


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

* Re: Why can't `gnus-draft-setup' be bytecompiled?
  1998-03-09 23:01 Why can't `gnus-draft-setup' be bytecompiled? SL Baur
@ 1998-03-09 23:19 ` Hrvoje Niksic
  1998-03-13 21:39   ` Lars Magne Ingebrigtsen
  1998-03-14  3:11   ` Hallvard B Furuseth
  1998-03-14  2:29 ` Hallvard B Furuseth
  1 sibling, 2 replies; 11+ messages in thread
From: Hrvoje Niksic @ 1998-03-09 23:19 UTC (permalink / raw)


SL Baur <steve@xemacs.org> writes:

> `gnus-draft-setup' is wrapped in a progn and has the annotation:
> 
> ;;;!!!If this is byte-compiled, it fails miserably.
> ;;;!!!I have no idea why.
> 
> I just tried it bytecompiled and it seemed to work.  What was/is
> broken about it?  If it's an editor bug I want to fix it.

It is probably a manifestation of the bug I've fixed a few betas ago.
You will note that `gnus-setup-message' makes use of uninterned
symbols to make macro execution safe.  While this method works in the
interpreter, it fails for compile code because the reader interns the
symbols in the obarray.

This has been fixed by introducing the `#:' gensym syntax and making
the byte-compiler emit it by default.  FSFmacs 20 contains the same
fix, courtesy Erik Naggum.

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
A radioactive cat has eighteen half-lives.


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

* Re: Why can't `gnus-draft-setup' be bytecompiled?
  1998-03-09 23:19 ` Hrvoje Niksic
@ 1998-03-13 21:39   ` Lars Magne Ingebrigtsen
  1998-03-14  3:11   ` Hallvard B Furuseth
  1 sibling, 0 replies; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-03-13 21:39 UTC (permalink / raw)


From owner-ding@hpc.uh.edu  Fri Mar 13 14:36:19 1998
Return-Path: <owner-ding@hpc.uh.edu>
Received: from xemacs.org (xemacs.cs.uiuc.edu [128.174.252.16])
	by altair.xemacs.org (8.8.8/8.8.8) with ESMTP id OAA04416
	for <steve@altair.xemacs.org>; Fri, 13 Mar 1998 14:36:18 -0800
Received: from gizmo.hpc.uh.edu (gizmo.hpc.uh.edu [129.7.102.31])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id QAA25707
	for <steve@xemacs.org>; Fri, 13 Mar 1998 16:31:04 -0600 (CST)
Received: from sina.hpc.uh.edu (sina.hpc.uh.edu [129.7.3.5]) by gizmo.hpc.uh.edu (8.7.6/8.7.3) with ESMTP id RAS09966; Fri, 13 Mar 1998 17:05:50 -0600
Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 13 Mar 1998 16:27:04 -0600 (CST)
Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by sina.hpc.uh.edu (8.7.3/8.7.3) with SMTP id QAA15029 for <ding@hpc.uh.edu>; Fri, 13 Mar 1998 16:25:54 -0600 (CST)
Received: (qmail 6630 invoked by uid 504); 13 Mar 1998 22:25:41 -0000
Received: (qmail 6627 invoked from network); 13 Mar 1998 22:25:40 -0000
Received: from xyplex35.uio.no (HELO sparky.gnus.org) (129.240.154.55)
  by claymore.vcinet.com with SMTP; 13 Mar 1998 22:25:13 -0000
Received: (from larsi@localhost)
	by sparky.gnus.org (8.8.5/8.8.5) id XAA06882;
	Fri, 13 Mar 1998 23:19:51 +0100
Mail-Copies-To: never
To: ding@gnus.org
Subject: Re: no forced authinfo in 5.6.2?
References: <whzpj07vxd.fsf@norne.oslo.metis.no>
From: Lars Magne Ingebrigtsen <larsi@gnus.org>
Date: 13 Mar 1998 22:18:48 +0100
In-Reply-To: Steinar Bang's message of "08 Mar 1998 21:46:22 +0100"
Message-ID: <m3iupil26f.fsf@sparky.gnus.org>
X-Mailer: Gnus v5.6.3/Emacs 19.34
X-Face: &w!^oO<W.WBH]FsTP:P0f9X6M-ygaADlA_)eF$<UwQzj7:C=Gi<a?/_4$LX^@$Qq7-O&XHp
 lDARi8e8iT<(A$LWAZD*xjk^')/wI5nG;1cNB>~dS|}-P0~ge{$c!h\<y
Lines: 13
Sender: owner-ding@hpc.uh.edu
Precedence: list
X-Majordomo: 1.94.jlt7

Steinar Bang <sb@metis.no> writes:

> I just looked at the nntp.el in 5.6.2, doesn't seem to be any code
> there looking for some way to force authinfo on an NNTP server that
> doesn't ask for it.
> 
> Was this dropped because people disagreed with the proposed syntax?

Well, I didn't feel it was resolved.  Should I add a "force" tag?

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: Why can't `gnus-draft-setup' be bytecompiled?
  1998-03-09 23:01 Why can't `gnus-draft-setup' be bytecompiled? SL Baur
  1998-03-09 23:19 ` Hrvoje Niksic
@ 1998-03-14  2:29 ` Hallvard B Furuseth
  1998-03-19 12:25   ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 11+ messages in thread
From: Hallvard B Furuseth @ 1998-03-14  2:29 UTC (permalink / raw)


SL Baur <steve@xemacs.org> writes:

> `gnus-draft-setup' is wrapped in a progn and has the annotation:
> 
> ;;;!!!If this is byte-compiled, it fails miserably.
> ;;;!!!I have no idea why.

It *is* bytecompiled in emacs19. To leave it uncompiled, gnus-draft.el
would need
	(dont-compile (defun gnus-draft-setup ...))
or, if you prefer,
	(eval '(defun gnus-draft-setup ...))
It was the emacs18 compiler which only compiled top-level defuns.


Looking at this, I noticed a bug in gnus-setup-message:

(defmacro gnus-setup-message (config &rest forms)
  ...
    `(let (...)
	 ...
	 (set (make-local-variable 'gnus-message-group-art)
	      (cons ,gnus-newsgroup-name ,article))
                    ^^^^^^^^^^^^^^^^^^^^

This expands to the value which gnus-newsgroup-name has *at compile
time*.  That's normally nil, unless you byte-compile inside emacs.

Normally you should only use `,' in front of the macro arguments (or
values computed from the macro arguments).  There are several other
occurrences of ",gnus-*" in gnus-msg.el.  And other places, as seen with
	egrep ',@* *(gnus|nn[a-z0-9]*)-' *.el

-- 
Hallvard


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

* Re: Why can't `gnus-draft-setup' be bytecompiled?
  1998-03-09 23:19 ` Hrvoje Niksic
  1998-03-13 21:39   ` Lars Magne Ingebrigtsen
@ 1998-03-14  3:11   ` Hallvard B Furuseth
  1998-03-14  3:23     ` Hrvoje Niksic
  1 sibling, 1 reply; 11+ messages in thread
From: Hallvard B Furuseth @ 1998-03-14  3:11 UTC (permalink / raw)


Hrvoje Niksic <hniksic@srce.hr> writes:

> You will note that `gnus-setup-message' makes use of uninterned
> symbols to make macro execution safe.  While this method works in the
> interpreter, it fails for compile code because the reader interns the
> symbols in the obarray.

In practice, this means that the byte-compiled version reserves these
variable names (so they may not be used outside this macr), and uses
them directly without make-symbol.  That should be OK unless the macro
can give these variables as arguments to another instance of itself.

> This has been fixed by introducing the `#:' gensym syntax and making
> the byte-compiler emit it by default.  FSFmacs 20 contains the same
> fix, courtesy Erik Naggum.

A hack which works in emacs19 as well is to replace (make-symbol "foo")
with (gensym "foo").  It appends a unique-per-session number to "foo"
and then does make-symbol.

-- 
Hallvard


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

* Re: Why can't `gnus-draft-setup' be bytecompiled?
  1998-03-14  3:11   ` Hallvard B Furuseth
@ 1998-03-14  3:23     ` Hrvoje Niksic
  1998-03-14  4:09       ` Aaron M. Ucko
  0 siblings, 1 reply; 11+ messages in thread
From: Hrvoje Niksic @ 1998-03-14  3:23 UTC (permalink / raw)


Hallvard B Furuseth <h.b.furuseth@usit.uio.no> writes:

> A hack which works in emacs19 as well is to replace (make-symbol "foo")
> with (gensym "foo").

Doesn't that require `cl.el'?  Last time I checked, Stallman didn't
want many packages to use the CL extensions.

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
Which is worse: ignorance or apathy?  Who knows?  Who cares?


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

* Re: Why can't `gnus-draft-setup' be bytecompiled?
  1998-03-14  3:23     ` Hrvoje Niksic
@ 1998-03-14  4:09       ` Aaron M. Ucko
  1998-03-19 12:30         ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Aaron M. Ucko @ 1998-03-14  4:09 UTC (permalink / raw)
  Cc: ding

Hrvoje Niksic <hniksic@srce.hr> writes:

> > A hack which works in emacs19 as well is to replace (make-symbol "foo")
> > with (gensym "foo").
> 
> Doesn't that require `cl.el'?  Last time I checked, Stallman didn't
> want many packages to use the CL extensions.

That's a spurious argument.  As of Gnus 5.5, 63 of the 79 elisp files
in Gnus required 'cl.

-- 
Aaron M. Ucko, KB1CJC <amu@mit.edu> (finger amu@monk.mit.edu)


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

* Re: Why can't `gnus-draft-setup' be bytecompiled?
  1998-03-14  2:29 ` Hallvard B Furuseth
@ 1998-03-19 12:25   ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-03-19 12:25 UTC (permalink / raw)


Hallvard B Furuseth <h.b.furuseth@usit.uio.no> writes:

> It *is* bytecompiled in emacs19.

So it is.  Huh.  Even weirder.

> Looking at this, I noticed a bug in gnus-setup-message:
> 
> (defmacro gnus-setup-message (config &rest forms)
>   ...
>     `(let (...)
> 	 ...
> 	 (set (make-local-variable 'gnus-message-group-art)
> 	      (cons ,gnus-newsgroup-name ,article))
>                     ^^^^^^^^^^^^^^^^^^^^
> 
> This expands to the value which gnus-newsgroup-name has *at compile
> time*.  That's normally nil, unless you byte-compile inside emacs.

Hm, yes...  Ah; I see.  It's only used in nnvirtual groups...

> Normally you should only use `,' in front of the macro arguments (or
> values computed from the macro arguments).  There are several other
> occurrences of ",gnus-*" in gnus-msg.el.  And other places, as seen with
> 	egrep ',@* *(gnus|nn[a-z0-9]*)-' *.el

They are mostly used when creating functions on-the-fly.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: Why can't `gnus-draft-setup' be bytecompiled?
  1998-03-14  4:09       ` Aaron M. Ucko
@ 1998-03-19 12:30         ` Lars Magne Ingebrigtsen
  1998-03-21  2:09           ` Aaron M. Ucko
  0 siblings, 1 reply; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-03-19 12:30 UTC (permalink / raw)


amu@MIT.EDU (Aaron M. Ucko) writes:

> That's a spurious argument.  As of Gnus 5.5, 63 of the 79 elisp files
> in Gnus required 'cl.

They do?  Where?

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: Why can't `gnus-draft-setup' be bytecompiled?
  1998-03-19 12:30         ` Lars Magne Ingebrigtsen
@ 1998-03-21  2:09           ` Aaron M. Ucko
  1998-03-23 13:15             ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Aaron M. Ucko @ 1998-03-21  2:09 UTC (permalink / raw)
  Cc: ding

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> amu@MIT.EDU (Aaron M. Ucko) writes:
> 
> > That's a spurious argument.  As of Gnus 5.5, 63 of the 79 elisp files
> > in Gnus required 'cl.
> 
> They do?  Where?

Right before they require Gnus, typically:

#amu(amu)@tux:/afs/sipb.mit.edu/contrib/emacs/packages/gnus-5.4.67/lisp
; fgrep -3 "(require 'cl)" *.el
cus-face.el-
cus-face.el-(require 'custom)
cus-face.el-
cus-face.el:(eval-and-compile (require 'cl))
cus-face.el-
cus-face.el-;;; Compatibility.
cus-face.el-
--
dgnushack.el-
dgnushack.el-(fset 'facep 'ignore)
dgnushack.el-
dgnushack.el:(require 'cl)
dgnushack.el-(require 'bytecomp)
dgnushack.el-(push "." load-path)
dgnushack.el-(require 'lpath)
--
earcon.el-(if (null (boundp 'running-xemacs))
earcon.el-    (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)))
earcon.el-
earcon.el:(eval-when-compile (require 'cl))
earcon.el-(require 'gnus)
earcon.el-(require 'gnus-audio)
earcon.el-(require 'gnus-art)
--
gnus-art.el-
gnus-art.el-;;; Code:
gnus-art.el-
gnus-art.el:(eval-when-compile (require 'cl))
gnus-art.el-
gnus-art.el-(require 'custom)
gnus-art.el-(require 'gnus)
--
etc., etc., etc.

-- 
Aaron M. Ucko, KB1CJC <amu@mit.edu> (finger amu@monk.mit.edu)


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

* Re: Why can't `gnus-draft-setup' be bytecompiled?
  1998-03-21  2:09           ` Aaron M. Ucko
@ 1998-03-23 13:15             ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-03-23 13:15 UTC (permalink / raw)


amu@mit.edu (Aaron M. Ucko) writes:

> > > That's a spurious argument.  As of Gnus 5.5, 63 of the 79 elisp files
> > > in Gnus required 'cl.
> > 
> > They do?  Where?
> 
> Right before they require Gnus, typically:

[...]

> earcon.el:(eval-when-compile (require 'cl))

Etc.

This doesn't require cl -- when running, which is the only thing that
matters. 

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

end of thread, other threads:[~1998-03-23 13:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-09 23:01 Why can't `gnus-draft-setup' be bytecompiled? SL Baur
1998-03-09 23:19 ` Hrvoje Niksic
1998-03-13 21:39   ` Lars Magne Ingebrigtsen
1998-03-14  3:11   ` Hallvard B Furuseth
1998-03-14  3:23     ` Hrvoje Niksic
1998-03-14  4:09       ` Aaron M. Ucko
1998-03-19 12:30         ` Lars Magne Ingebrigtsen
1998-03-21  2:09           ` Aaron M. Ucko
1998-03-23 13:15             ` Lars Magne Ingebrigtsen
1998-03-14  2:29 ` Hallvard B Furuseth
1998-03-19 12:25   ` Lars Magne Ingebrigtsen

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