Gnus development mailing list
 help / color / mirror / Atom feed
* spam-stat warning
@ 2011-05-31 21:09 Lars Magne Ingebrigtsen
  2011-06-01 13:09 ` Ted Zlatanov
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-05-31 21:09 UTC (permalink / raw)
  To: ding

On each Gnus startup I now get the following warning in Emacs 24:

Warning: defvar ignored because spam-stat-install-hooks is let-bound

And this is the reason:

(eval-and-compile
  (when (condition-case nil
            (let ((spam-stat-install-hooks nil))
              (require 'spam-stat))
          (file-error
           (defalias 'spam-stat-register-ham-routine 'ignore)
           (defalias 'spam-stat-register-spam-routine 'ignore)
           nil))

And this is because:           
           
(when spam-stat-install-hooks
  (spam-stat-install-hooks-function))
           
I think that this may be a misfeature.  Just `require'-ing a file should
do anything but load the file, in my opinion.  If you want to install
stuff, then you should call the installation function explicitly.
Otherwise it's just too confusing...
  
-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




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

* Re: spam-stat warning
  2011-05-31 21:09 spam-stat warning Lars Magne Ingebrigtsen
@ 2011-06-01 13:09 ` Ted Zlatanov
  2011-06-03 22:08   ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Ted Zlatanov @ 2011-06-01 13:09 UTC (permalink / raw)
  To: ding

On Tue, 31 May 2011 23:09:35 +0200 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 

LMI> On each Gnus startup I now get the following warning in Emacs 24:
LMI> Warning: defvar ignored because spam-stat-install-hooks is let-bound

LMI> And this is the reason:

LMI> (eval-and-compile
LMI>   (when (condition-case nil
LMI>             (let ((spam-stat-install-hooks nil))
LMI>               (require 'spam-stat))
LMI>           (file-error
LMI>            (defalias 'spam-stat-register-ham-routine 'ignore)
LMI>            (defalias 'spam-stat-register-spam-routine 'ignore)
LMI>            nil))

LMI> And this is because:           
           
LMI> (when spam-stat-install-hooks
LMI>   (spam-stat-install-hooks-function))
           
LMI> I think that this may be a misfeature.  Just `require'-ing a file should
LMI> do anything but load the file, in my opinion.  If you want to install
LMI> stuff, then you should call the installation function explicitly.
LMI> Otherwise it's just too confusing...

I don't think many people are using spam-stat.el anyway, so changing
this immediately is OK with me.  Do you want:

(defun spam-stat-install ()
  (interactive)
  (when spam-stat-install-hooks
    (spam-stat-install-hooks-function)))

or were you thinking deeper surgery?

Ted




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

* Re: spam-stat warning
  2011-06-01 13:09 ` Ted Zlatanov
@ 2011-06-03 22:08   ` Lars Magne Ingebrigtsen
  2011-06-28 14:25     ` Ted Zlatanov
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-06-03 22:08 UTC (permalink / raw)
  To: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> I don't think many people are using spam-stat.el anyway, so changing
> this immediately is OK with me.  Do you want:
>
> (defun spam-stat-install ()
>   (interactive)
>   (when spam-stat-install-hooks
>     (spam-stat-install-hooks-function)))
>
> or were you thinking deeper surgery?

I think that would be fine.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




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

* Re: spam-stat warning
  2011-06-03 22:08   ` Lars Magne Ingebrigtsen
@ 2011-06-28 14:25     ` Ted Zlatanov
  0 siblings, 0 replies; 4+ messages in thread
From: Ted Zlatanov @ 2011-06-28 14:25 UTC (permalink / raw)
  To: ding

On Sat, 04 Jun 2011 00:08:54 +0200 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 

LMI> Ted Zlatanov <tzz@lifelogs.com> writes:
>> I don't think many people are using spam-stat.el anyway, so changing
>> this immediately is OK with me.  Do you want:
>> 
>> (defun spam-stat-install ()
>> (interactive)
>> (when spam-stat-install-hooks
>> (spam-stat-install-hooks-function)))
>> 
>> or were you thinking deeper surgery?

LMI> I think that would be fine.

I see you made that change; thank you.

Ted




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

end of thread, other threads:[~2011-06-28 14:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-31 21:09 spam-stat warning Lars Magne Ingebrigtsen
2011-06-01 13:09 ` Ted Zlatanov
2011-06-03 22:08   ` Lars Magne Ingebrigtsen
2011-06-28 14:25     ` Ted Zlatanov

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